OpenERP Installation in Ubuntu 12.04LTS
Update the packages in the serve before starting the the installation. To update the VPS :
1 2 |
sudo apt-get update sudo apt-get dist-upgrade |
Add an openerp user to own and run the application.
1 |
sudo adduser --system --home=/opt/openerp --group openerp |
Note that a “home” of /opt/openerp has been specified, this is where the OpenERP server code will reside and is created automatically by the command above.
Install postgresql
1 |
sudo apt-get install postgresql |
Switch to postgres user to create database
1 |
sudo su - postgres |
Now create database
1 |
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp |
Provide password when prompted.
Type exit to switch user.
1 |
exit |
Install required python dependencies
1 |
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 |
Download openerp 7.0
1 |
wget <a class="external free" href="http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz" rel="nofollow">http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz</a> |
Now extract the tarball
1 2 |
cd /opt/openerp sudo tar xvf ~/openerp-7.0-latest.tar.gz |
Change the ownership of the files to the Openerp user we created earlier.
1 |
sudo chown -R openerp: * |
Rename the directory to server for later use
1 |
sudo cp -a openerp-7.0 server |
Copy the conf file to /etc
1 |
sudo cp /opt/openerp/server/install/openerp-server.conf /etc/ |
Now change the ownership
1 2 |
sudo chown openerp: /etc/openerp-server.conf sudo chmod 640 /etc/openerp-server.conf |
Edit openerp-server.conf and edit the line db_password = False. Replace False with the password you provided for postgres user and db_user=admin with your postgres user.
1 |
sudo nano /etc/openerp-server.conf |
Also add the line below to specify the log file
1 |
logfile = /var/log/openerp/openerp-server.log |
Switch to openerp user
1 |
sudo su - openerp -s /bin/bash |
You will see a messages saying openerp is running you have completed your installation successfully.
In your browser type http://<IPaddress>:8069 to verify
Replace the contents of the file /opt/openerp/server/install/openerp-server.init with the file below
Copy that file to /etc/init.d and rename it as
1 |
openerp-server |
Make the script executable and owned by root
1 2 |
sudo chmod 755 /etc/init.d/openerp-server sudo chown root: /etc/init.d/openerp-server |
Set the location of openerp log file and make it writable by openerp.
1 2 |
sudo mkdir /var/log/openerp sudo chown openerp:root /var/log/openerp |
To make openerp start at boot
1 |
sudo update-rc.d openerp-server defaults |
Now openerp will start at boot.
That’s it!!