Monday, 10 August 2015

Ajenti: Web based Control panel for managing linux server


Ajenti is an open-source web based system Management control panel for managing remote system administrating tasks from the browser similiar to Webmin module. It is a much powerful and lightweighted tool, that provides fast and responsive web interface for managing small server setups and best suitable for VPS and dedicated servers.

It can install packages and run commands, and you can view basic server information such as RAM in use, free disk space, etc. All this can be accessed from a web browser.
Optionally, an add-on package called Ajenti V allows you to manage multiple websites from the same control panel.

Pre-requisites for Ajenti:

1. Registered Domain name
2. Setup hostname on the Server on which you are going to setup the Ajenti CP.
3. A non-root user with sudo privileges.

Installing Ajenti


On your server, as a user with sudo access, first add the repository key. This is used to validate the sources of the Ajenti packages you will be installing.
 $ wget http://repo.ajenti.org/debian/key -O- | sudo apt-key add -  

Then add the actual repository to your sources list:

 $ echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" | sudo tee -a /etc/apt/sources.list  

Now you can update your packages and begin the install process by running:
 $ sudo apt-get update && sudo apt-get install ajenti  

When it prompts you to continue, type Y and press ENTER. The install process may take a few minutes. After the process is over, start the Ajenti server:
 $ sudo service ajenti restart  

Configuring Ajenti

Now, you ajenti is installed, need to configure and it will by default take all the default metrics of server. Open a web browser and browse to https://panel.your_domain_name:8000/ or https://IP:8000/.

Log in with these default credentials:

Username: root

Password: admin

You will now be inside your new Ajenti control panel.








Plugins


Ajenti already has a lot of functionality built in by default, but if you want even more settings and configurable items in your panel, you can check out the Plugins section. Some plugins are enabled by default, while others aren't, usually due to unsatisfied dependancies.

You can install disabled plugins by clicking on them in the Plugins menu and pressing the button next to the dependency it requires. Otherwise, if you later install an application manually and Ajenti has a plugin for, you can restart Ajenti and the corresponding menu should appear next time you log in.



System Management


Under the System section in the sidebar, there's a plethora of configurable items to choose from. You can manage hard drives with the Filesystems menu.






Congratulations: Ajenti control panel is installed on the server. Now, use it to manage server.




Saturday, 8 August 2015

Mail Server: OFBiz with Mysql Setup

Apache OFBiz™ is an open source product for the automation of enterprise processes that includes framework components and business applications for ERP (Enterprise Resource Planning), CRM (Customer Relationship Management), E-Business / E-Commerce, SCM (Supply Chain Management), MRP (Manufacturing Resource Planning), MMS/EAM (Maintenance Management System/Enterprise Asset Management), POS (Point Of Sale).

Apache OFBiz is licensed under the Apache License Version 2.0 and is part of The Apache Software Foundation.

Step 1: Install JAVA

Java is the primary requirement for installing Apache OFBiz. It required minimum Java 1.6 to installed on your system. Make sure you have Java installed with proper version on your system.
 # java -version  
If you do not Java installed, Use below tutorial to install java else ignore it.

For Ubuntu, Debian and LinuxMint Users – Install JAVA 7 or Install JAVA 8

Step 2: Install Mysql and Setup for OFBiz

MySQL is a powerful database management system used for organizing and retrieving data

To install MySQL, open terminal and type in these commands:
 sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql  

During the installation, MySQL will ask you to set a root password. If you miss the chance to set the password while the program is installing, it is very easy to set the password later from within the MySQL shell.

Once you have installed MySQL, we should activate it with this command:
 sudo mysql_install_db  

Creating Databases and user access for OFBiz

We will be creating databases and user access which will be used with ofbiz to store the data. Below are the commands:
 mysql>create database ofbiz;  
 mysql>create database ofbizolap;  
 mysql>create database ofbiztenant;  
 mysql>use mysql;  
 mysql>select database();  
 mysql>create user ofbiz@localhost;  
 mysql>create user ofbizolap@localhost;  
 mysql>create user ofbiztenant@localhost;  
 mysql>update user set password=PASSWORD("ofbiz") where User='ofbiz';  
 mysql>update user set password=PASSWORD("ofbizolap") where User='ofbizolap';  
 mysql>update user set password=PASSWORD("ofbiztenant") where User='ofbiztenant';  
 mysql>grant all privileges on *.* to 'ofbiz'@localhost identified by 'ofbiz';  
 mysql>grant all privileges on *.* to 'ofbizolap'@localhost identified by 'ofbizolap';  
 mysql>grant all privileges on *.* to 'ofbiztenant'@localhost identified by 'ofbiztenant';  

Step 3: Download Apache OFBiz from SVN


We will be using SVN download latest Apache OFBiz files. first make sure you have svn client installed on system after that checkout the latest build from the subversion repository of OFBiz.
 # cd /opt/  
 # yum install subversion  
 # svn co http://svn.apache.org/repos/asf/ofbiz/trunk apache-ofbiz  

Step 4: Integrating Apache OFBiz with Mysql

 Before we build Apache OFBiz, we will be integrating it with Mysql
 1. Firstly, will be needing the JDBC connector: mysql-connector-java-5.1.14-bin.jar - to be placed in <ofbiz-dir>/framework/entity/lib/jdbc
 2. Create a backup of apache-ofbiz/framework/entity/config/entityengine.xml
 3. Edit entityengine.xml as follows:
 a. Add the following datasources below the datasource 'localmysql'

 <datasource name="localmysqlolap"  
     helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"  
     field-type-name="mysql"  
     check-on-start="true"  
     add-missing-on-start="true"  
     check-pks-on-start="false"  
     use-foreign-keys="true"  
     join-style="ansi-no-parenthesis"  
     alias-view-columns="false"  
     drop-fk-use-foreign-key-keyword="true"  
     table-type="InnoDB"  
     character-set="latin1"  
     collate="latin1_general_cs">  
   <read-data reader-name="seed"/>  
   <read-data reader-name="seed-initial"/>  
   <read-data reader-name="demo"/>  
   <read-data reader-name="ext"/>  
   <inline-jdbc  
       jdbc-driver="com.mysql.jdbc.Driver"  
       jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true"  
       jdbc-username="ofbizolap"  
       jdbc-password="ofbizolap"  
       isolation-level="ReadCommitted"  
       pool-minsize="2"  
       pool-maxsize="250"  
       time-between-eviction-runs-millis="600000"/>  
 </datasource>  
 <datasource name="localmysqltenant"  
     helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"  
     field-type-name="mysql"  
     check-on-start="true"  
     add-missing-on-start="true"  
     check-pks-on-start="false"  
     use-foreign-keys="true"  
     join-style="ansi-no-parenthesis"  
     alias-view-columns="false"  
     drop-fk-use-foreign-key-keyword="true"  
     table-type="InnoDB"  
     character-set="latin1"  
     collate="latin1_general_cs">  
   <read-data reader-name="seed"/>  
   <read-data reader-name="seed-initial"/>  
   <read-data reader-name="demo"/>  
   <read-data reader-name="ext"/>  
   <inline-jdbc  
       jdbc-driver="com.mysql.jdbc.Driver"  
       jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true"  
       jdbc-username="ofbiztenant"  
       jdbc-password="ofbiztenant"  
       isolation-level="ReadCommitted"  
       pool-minsize="2"  
       pool-maxsize="250"  
       time-between-eviction-runs-millis="600000"/>  
 </datasource>  

b. Replace derby with mysql in default, default-no-eca and test delegators as follows:

 <delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">  
   <group-map group-name="org.ofbiz" datasource-name="localmysql"/>  
   <group-map group-name="org.ofbiz.olap" datasource-name="localmysqlolap"/>  
   <group-map group-name="org.ofbiz.tenant" datasource-name="localmysqltenant"/>  
 </delegator>  
 <delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">  
   <group-map group-name="org.ofbiz" datasource-name="localmysql"/>  
   <group-map group-name="org.ofbiz.olap" datasource-name="localmysqlolap"/>  
   <group-map group-name="org.ofbiz.tenant" datasource-name="localmysqltenant"/>  
 </delegator>  
 <delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">  
   <group-map group-name="org.ofbiz" datasource-name="localmysql"/>  
   <group-map group-name="org.ofbiz.olap" datasource-name="localmysqlolap"/>  
   <group-map group-name="org.ofbiz.tenant" datasource-name="localmysqltenant"/>  
 </delegator>   

Save the file.

Step 5: Installing Apache OFBiz

 # cd /opt/apache-ofbiz/  
 # ./ant  

Step 6: Install Dataset, Load Demo and Seed Data

Apache OFBiz provides dataset, demo data and seed data, this data is useful for experiment. This data is unuseful for production setup.

 # ./ant load-demo  
 # ./ant load-extseed  

Step 7: Start Apache OFBiz Service

After installing Apache OFBiz, Use following command to start Apache OFBiz service on system.

 # ./ant start  

Access Apache OFBiz in Browser


Access Apache OFBiz in browser on port 8443 as below given url and login credentials.

 URL: https://svr10.tecadmin.net:8443/myportal/control/main  
 Admin Username: admin  
 Admin Password: ofbiz  

References:

http://ofbiz.apache.org/







Congratulation’s! You have successfully install apache OFBiz with Mysql integration on your Linux system.

Thursday, 6 August 2015

How to Install JAVA 8 (JDK 8u45) on Ubuntu & LinuxMint Via PPA


This blog post will help you to Install Oracle JAVA 8 (JDK/JRE 8u25) on Ubuntu 14.04 LTS, 12.04 LTS and 10.04 and LinuxMint systems using PPA File.

Installing Java 8 on Ubuntu

Add the webupd8team Java PPA repository in your system and install Oracle Java 8 using following set of commands.
 $ sudo add-apt-repository ppa:webupd8team/java  
 $ sudo apt-get update  
 $ sudo apt-get install oracle-java8-installer  


Verify Installed Java Version

After successfully installing oracle Java using above step verify installed version using following command.
 manish@tech:~$ java -version  
 java version "1.8.0_45"  
 Java(TM) SE Runtime Environment (build 1.8.0_45-b14)  
 Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)  


Configuring Java Environment

In Webupd8 ppa repository also providing a package to set environment variables, Install this package using following command.
 $ sudo apt-get install oracle-java8-set-default  

Reference:-

https://launchpad.net/~webupd8team/+archive/ubuntu/java