OpenERP 7 installation

Installation stpes on ubuntu 12.04 in brief:

Step 1. Update Ubuntu with latest version and patches

sudo apt-get update

Step 2. Create the OpenERP user that will own and run the application

sudo adduser --system --home=/opt/openerp --group openerp

        **command to change user (verify you are able to login with openerp user or not):

        sudo su - openerp -s /bin/bash
        exit
         
          
        ** logout from openerp user and continue installation steps:


        

Step 3. Install and configure the database server, PostgreSQL

   sudo apt-get install postgresql

After installing postgresql swith user to postgres and
 
  sudo su - postgres

Create 'openerp' user in postgres 
   createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp

Enter password for new role: ********
Enter it again: ********
exit from the postgres user account:
exit

Step 4. Install the necessary Python libraries for the server


   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


It will install all the dependencies for OpenERP 7.0. 

Step 5. Install the OpenERP server

Get the latest version of the application from below link.
http://nightly.openerp.com/7.0/nightly/src/.


At the time of writing the blog I found openerp-7.0-latest.tar.gz ; to download it type below command on your terminal.

   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 ~/penerp-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: *

Finally, copy the server directory with simpler name, such that the configuration files and boot scripts don’t need constant editing.

   sudo cp -a openerp-7.0 server

Step 6. Configuring the OpenERP application


The default configuration file for the server (in /opt/openerp/server/install/) is actually very minimal and will, with only one small change work fine so we’ll simply copy that file to where we need it 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 writeable only by the openerp
user and group and only readable by openerp and root.

To allow the OpenERP server to run initially, you should only need to change one line in openerp-server.conf.
  Open the file, here I am using vi text editor,

 sudo vi /etc/openerp-server.conf

Change the line db_password = False. Replace False  with the same password you used back in step 3.

If we want to see logs,then we need to inform OpenERP where to write its log file.  Type below line in openerp-server.conf file:

logfile = /var/log/openerp/openerp-server.log

Once the configuration file is edited and saved, you can start the server just to check if it actually runs.

Step 7. Testing the server

Switch to openerp user:

  sudo su - openerp -s /bin/bash


Start openerp server :

  /opt/openerp/server/openerp-server


If you end up with a few lines eventually saying OpenERP is running and waiting for connections then you are all set.

Type http://0.0.0.0.:8069 or http://localhost:8069 in your browser you can see below screen

OpenERP 7 Database Management Screen
OpenERP 7.0 Database Management Screen

 

Additional steps to install openerp boot up script:

Step 1. Installing the boot script

Copy all the contents from This link .

Create new file /etc/init.d/openerp-server

  sudo vi /etc/init.d/openerp-server

and paste the contents of the  above link in that file.

Now make this file executable and owned by root by following commands:

   sudo chmod 755 /etc/init.d/openerp-server
   sudo chown root: /etc/init.d/openerp-server

In /etc/openerp-server.conf we have added line for creating log file. So we need to create a directory as per path described in that line and also also we must make it writeable by the openerp user:

   sudo mkdir /var/log/openerp
   sudo chown openerp:root /var/log/openerp

Step 2. 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. There’s really no point ploughing on if the server doesn’t start…

OpenERP 7 Database Management Screen
OpenERP 7.0 Database Management Screen
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) and use port 8069. The url will look something like this:

http://IP_or_domain.com:8069

What you should see is a screen like this one (it is the Database Management Screen because you have no OpenERP databases yet):

Step 3. Automating OpenERP startup and shutdown

If everything above seems to be working OK, the final step is make the script start and stop automatically with the Ubuntu Server. To do this type:
sudo update-rc.d openerp-server defaults

You can now try rebooting your ubuntu if you like. OpenERP should be running by the time you log back in.




That's All for openepr7 configuration. Hope this blog might be helpful to you to install openerp.

Courtesy: Alan Lord


Also Pasting here a reference link(video) to install OpenERP7 using virtual box.

Install Openerp7 using Virtualbox

You can also try vmware player Instead of Virtualbox.


Refer this url for openerp7 release notes




Comments

Popular posts from this blog

Geeta - Sea of divine knowledge and Motivation for Life time

ERP Functional workshop at Singapore