Installation Of OpenERP Server 5.0, OpenERP GTK Client 5.0 And OpenERP Web Client 5.0.1 On Ubuntu Server 9.0.4 & Desktop 9.04 - Page 2

Creation of a new database for OpenERP Server with OpenERP GTK Client (Optional)

Launch openerp-client and create a new database for openerp-server:

$ openerp-client
File/Archivo -> Databases/Bases de Datos -> New Database/Nueva Base de Datos



Super-administrator password: “admin”

New database name: “openerp”

Administrator password: “openerp”

Confirm password: “openerp”



Fixing OpenERP Server INIT script bug

$ sudo vi /etc/openerp-server.conf

Comment out or remove the following line:

Edit the init script:

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

Add the following line to the beginning of the init script:

Setting up OpenERP Web client

The most complicated part is with openerp-web because TurboGears 1.0.8 is not supported with the default Ubuntu 9.04 python version (python2.6). Basically we want to avoid the following error:

$ sudo easy_install -U openerp-web
Running openerp-web-5.0.1-0/ -q bdist_egg –dist-dir /tmp/easy_install-SJE_07/openerp-web-5.0.1-0/egg-dist-tmp-NFndZn
Error: python-xml >= 0.8.4 (PyXML, XML Tools for python) is required.
error: Setup script exited with 1

Then, to use easy_install for python2.5:

$ sudo apt-get install python2.5-setuptools

You must remove the default soft link to easy_install2.6

$ sudo rm /usr/bin/easy_install

Then create the new soft link to easy_install2.5:

$ sudo ln -s /usr/bin/easy_install-2.5 /usr/bin/easy_install

Install TurboGears 1.0.8

$ sudo easy_install TurboGears==1.0.8

Check whether TurboGears is properly installed or not...

$ tg-admin info

Make sure the following file does not exist:

$ sudo rm /usr/local/bin/easy_install

Install openerp-web:

$ sudo easy_install -U openerp-web
Adding openerp-web 5.0.1-0 to easy-install.pth file
Installing start-openerp-web script to /usr/bin
Installed /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg
Processing dependencies for openerp-web
Finished processing dependencies for openerp-web

Locate the config/default.cfg in the installed EGG, and make appropriate changes, especially:

$ cd /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg
$ sudo vi config/default.cfg
host = 'localhost'
port = '8070'
protocol = 'socket'



!Be careful with the quotation marks in config files like the last one! if you copy and paste, be sure the text you copy from is preformatted or you might not be able to start openerp-web INIT script (/etc/init.d/openerp-web start). The previous line has been preformatted. Type the quotation marks if you encounter problems or you want to be sure.

Restart postgres and opener-server:

$ sudo /etc/init.d/postgresql-8.3 restart
* Restarting PostgreSQL 8.3 database server [ OK ]
$ sudo /etc/init.d/openerp-server restart
Restarting openerp-server: openerp-server.

Openerp-web run as service (non-root daemon)

$ sudo cp /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/scripts/openerp-web /etc/init.d/
$ sudo cp /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/config/default.cfg /etc/openerp-web.cfg

Alternate config file is now /etc/openerp-web.cfg. Somehow it is read by Ubuntu Server 9.0.4, but NOT by Ubuntu Desktop 9.0.4 (even though they both seem to have same config scripts and files). In case you’re setting this up on Ubuntu Desktop 9.0.4, just consider editing the default config file (/usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/config/default.cfg).

$ sudo chmod +x /etc/init.d/openerp-web
$ sudo vi /etc/init.d/openerp-web

Create /var/log/openerp-web.log with proper ownership:

$ sudo touch /var/log/openerp-web.log
$ sudo chown openerp /var/log/openerp-web.log

Now run following command to start the OpenERP Web automatically on system startup (Debian/Ubuntu):

$ sudo update-rc.d openerp-web start 70 2 3 4 5 . stop 20 0 1 6 .

Now start the web server with start-openerp-web command:

$ sudo -u openerp start-openerp-web

Generating JavaScript i18n message catalog for de_DE...
Generating JavaScript i18n message catalog for fr_FR...
Generating JavaScript i18n message catalog for es_ES...

If everything is fine, open your favourite web browser and type http://localhost:8080 (or http://your_ubuntuserver_ip_adress:8080), and you can see welcome page with login screen.

Please make sure cookies are enabled in your browser.

Share this page:

0 Comment(s)