Spreadfirefox Affiliate Button
Custom Search

Friday, May 8, 2009

Installing OpenERP (aka TinyERP) Stack on Ubuntu Intrepid 8.10

OpenERP, previously called TinyERP, but renamed due to the mismatch between its name and its size, is an open-source ERP system written (mostly) in Python and initiated in Belgium.

On Ubuntu Intrepid, the available openERP package from APT is still the old version 4.2.2 while the current one is 5.0.0.3 and the name of the package is still tinyerp-server and tinyerp-client. In Ubuntu Jaunty Jackalope, the default packages available from APT are current and have their name changed to openerp.

So, if your want to get the latest release of OpenERP on Intrepid , continue reading.

Installing The Pre requisites

You will need python, postgresql and some other necessary packages. So go ahead and open your terminal and type :

sudo apt-get install python python-setuptools python-psycopg2 python-reportlab python-egenix-mxdatetime python-xml python-tz python-pychart python-pydot python-lxml python-libxslt1 python-vobject python-gtk2 python-glade2 python-matplotlib python-hippocanvas evince xpdf flashplugin-nonfree postgresql

Installing Open ERP Server

Now, we need to download the tar file, extract it , then install it. Open your terminal and run each of the following line commands at a time.

wget http://www.openerp.com/download/stable/source/openerp-server-5.0.0-3.tar.gz
tar -xzf openerp-server-5.0.0-3.tar.gz
cd openerp-server-5.0.0-3
sudo python setup.py install

If your PostgreSQL server is up and running, login as the default superuser for PostgreSQL which is called postgres :

sudo su - postgres

you can now run the server using the following command:

openerp-server

Installing Open ERP Client

Open your terminal and type :

wget http://www.openerp.com/download/stable/source/openerp-client-5.0.0-3.tar.gz
tar -xzf openerp-client-5.0.0-3.tar.gz
cd openerp-client-5.0.0-3
sudo python setup.py install

You can now run the client using the following command:

openerp-client

You will be presented with some survey, you can fill the fields or cancel.
Then you need to create a database for the application. Through the menu, navigate to File ? Databases ? New Database

On the interface you can customize your server address and connection, database name and create an administration account for the application. Fill in the fields and click ok.

Follow the wizard to set up your basic application.

Installing Open ERP Web Client

We need to install TurboGears first. Open your terminal and type :

sudo easy_install TurboGears==1.0.8

Check whether it’s properly installed by typing :

tg-admin info

You should see the version information of TurboGears and related packages.

Now install the web client by typing :

sudo easy_install -U openerp-web

The configuration file is located at :

/usr/lib/python2.5/site-packages/openerp_web-5.0.0_3.1-py2.5.egg/config/default.cfg
Now start the web server with start-openerp-web command:

start-openerp-web

If you see message showing cherrypy._cperror.NotReady: Port not free, then make sure no other application is running on the specified port (8080 is default).

You can change port for by changing server.socket_port value in config/default.cfg.

If everything is fine, open your favorite web browser and type http://localhost:8080, and your can see the welcome page with the login screen.

Please make sure cookies are enabled in your browser.

Of course, OpenERP Server must be running at that time. If you have not previously created a database , you should create a database from the DBAdmin interface by clicking on Manage button that you can see besides the Database selection box. After creating a new database login with the admin/admin or demo/demo to see OpenERP in action…

Run Open ERP Web Client as service (daemon)

Open your terminal and type :

sudo cp /usr/lib/python2.5/site-packages/openerp_web-5.0.0_3.1-py2.5.egg/scripts/openerp-web /etc/init.d
sudo cp /usr/lib/python2.5/site-packages/openerp_web-5.0.0_3.1-py2.5.egg/config/default.cfg /etc/openerp-web.cfg
sudo chmod +x /etc/init.d/openerp-web

Make sure the user is terp in /etc/init.d/openerp-web :

sudo gedit /etc/init.d/openerp-web

Make sure you have : USER=”terp”
Now let’s edit /etc/openerp-web.cfg :

sudo gedit /etc/openerp-web.cfg

find :

args="('server.log',)"

and change it to :

args="('/var/log/openerp-web.log',)"

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

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

Now, run following command to start the OpenERP Web automatically on system startup :

sudo update-rc.d openerp-web defaults

Start the deamon :

sudo /etc/init.d/openerp-web start

Source : http://theindexer.wordpress.com

No comments: