Install OpenERP 7.0 on Ubuntu 12.04
OpenERP is an awesome ERP solution available in the open source world.
Following are the simple and easy steps to install OpenERP 7.0 in your ubuntu 12.04 OS.
1.Create OpenERP User to run the OpenERP Server .
Creating user called openerp to run the server. This user is a system user.
sudo adduser --system --home=/opt/openerp --group openerp
2. Install and configure the database server i.e. PostgreSQL
The next step is to install and configure the database server. Openerp is using PostgreSQL as the database. So just install and configure postgresql database on your system.
sudo apt-get install postgresql
Then configure the OpenERP user on postgres:
First login to the postgres user so we have the necessary privileges to configure the database.
sudo su - postgres
Now create a new database user. This is so OpenERP has access rights to connect to PostgreSQL and to create and drop databases. Remember what your choice of password is here; you will need it later on:
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
Enter password for new role: ********
Enter it again: ********
Finally exit from the postgres user account:
exit
3. Install the necessary Python libraries for the server
Now install necessary python dependencies and libraries for running the Open ERP Server.
In Ubuntu terminal type or copy-paste :
sudo apt-get install python-dateutil python-docutils python-feedparser python-gdata \
python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid \
python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing \
python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject \
python-webdav python-werkzeug python-xlwt python-yaml python-zsi
With that done, all the dependencies for installing OpenERP 7.0 are now satisfied (note that there are some new packages required since 6.1). It take some time to parse all the dependencies and installing all these packages.
4. Install the OpenERP server
Now just download the latest Open ERP Source Tarball from the official website. i.e.
http://nightly.openerp.com/7.0/nightly/ providing all the files. May be this will change on future. On src just download the latest tar ball.
Here I am using a wget command to download that tarball. You can point your browser and download the files.
sudo wget http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz
Now install the code where we need it: cd to the /opt/openerp/ directory and extract the tarball there.
cd /opt/openerp
sudo tar -xvf ~/openerp-7.0-latest.tar.gz
Next we need to change the ownership of all the the files to the OpenERP user and group we created earlier.
sudo chown -R openerp: *
The purpose of doing this is to copy the server directory to something with a simpler name so that the configuration files and boot scripts don’t need constant editing. when it comes to upgrading, it seems to make more sense to just keep a copy of the files in place and then overwrite them with the new code. This way you keep any custom or user-installed modules and reports etc. all in the right place.
sudo cp -a openerp-7.0 server
That’s the OpenERP server software installed. The last steps to a working system is to set up the configuration file and associated boot script so OpenERP starts and stops automatically when the server itself stops and starts.
5. Configuring the OpenERP application
Simply copy the default configuration file for the server (/opt/openerp/server/install/) to /etc/ and change it’s ownership and permissions:
sudo cp /opt/openerp/server/install/openerp-server.conf /etc/
sudo chown openerp: /etc/openerp-server.conf
sudo chmod 640 /etc/openerp-server.conf
The above commands make the file owned and writable only by the openerp user and group and only readable by openerp and root.
To allow the OpenERP server to run initially, change linedb_password = False to the same password used in step 2. Use any text editor here. I have used nano, e.g.
sudo nano /etc/openerp-server.conf
OR
vi /etc/openerp-server.conf
One other line we might as well add to the configuration file now, is to tell OpenERP where to write its log file. Add the following line to the openerp-server.conf file:
sudo su - openerp -s /bin/bash
/opt/openerp/server/openerp-server
If it says OpenERP is running and waiting for connections then you are all set.
6. Installing the boot script
For the final step we need to install a script which will be used to start-up and shut down the server automatically and also run the application as the correct user.
Similar to the configuration file, you need to either copy it or paste the contents of this script to a file in /etc/init.d/ and call it openerp-server. Once it is in the right place you will need to make it executable and owned by root:
sudo chmod 755 /etc/init.d/openerp-server
sudo chown root: /etc/init.d/openerp-server
In the configuration file there is an entry for the server’s log file. We need to create that directory first so that the server has somewhere to log to and also we must make it writable by the openerp user:
sudo mkdir /var/log/openerp
sudo chown openerp:root /var/log/openerp
7. Testing the server
To start the OpenERP server type:
sudo /etc/init.d/openerp-server start
You should now be able to view the logfile and see that the server has started.
less /var/log/openerp/openerp-server.log
If there are any problems starting the server you need to go back and check.
If the log file looks OK, now point your web browser at the domain or IP address of your OpenERP server (or localhost if you are on the same machine i.e. local machine) and use port 8069. The url will look something like this:
http://IP_or_domain.com:8069 (In case of remote access)
http://localhost:8069 (In case of local access)
TTo make sure the server stops properly type:
sudo /etc/init.d/openerp-server stop
*********************************************************************************
Thanks
Ujwala H. Pawade.
!!!! Freedom Matters Not The Cost !!!!!