create your own

Installing OpenERP on Ubuntu 9.04

89
rate or flag this page

By phos4us


OpenERP login window. Your journey begins here.
OpenERP login window. Your journey begins here.

Why would you want to install OpenERP? Well to put it very simply, it is an ERP / Accounting package which will fit almost any size business, no matter how complex their production. The slightly longer reason would be that it is a highly customizable ERP system due to its modular approach. This means that you can install certain modules as and when your business requires them. As your business expands so to can your ERP. Custom modules may also be written.

But I digress. This article is about installing OpenERP, not using it. That would be an entirely different article.

Installing OpenERP on Ubuntu 9.04 is not as easy as it could be, however there is a fairly simple way to work around the problems faced. The problems are basically as follows:

  1. OpenERP does not yet work with Python 2.6, which is now the Ubuntu default
  2. There is a problem with PyXML, which we will simple reinstall.

Installing the necessary packages


With the exception of PyXML (which will be reinstalled), this method uses only Ubuntu repository packages and merely makes some changes to the files which get installed. For some this may be considered a relatively 'easy' method.

as mentioned previously, the OpenERP packages require Python 2.5 while Ubuntu now uses Python 2.6 as its default. Due to this we need to get 'under the hood' and make some very minor changes to the files downloaded in these packages.

Firstly, lets make sure we have all the necessary packages.

$ sudo apt-get install openerp-server openerp-client python2.5 python2.5-dev python-profiler

This will install the packages needed to get up and running with OpenERP. Apart from OpenERP and Python 2.5, the Postgres database will also be installed. Great. If the above command completed successfully, then we can move on to the next step. If not, you will need to read through its output to try to determine what went wrong.

Install PyXML


We will need to reinstall PyXML from scratch as there are some problems with OpenERP and the Ubuntu release of PyXML.

$ wget http://sourceforge.net/projects/pyxml/files/pyxml/0.8.4/PyXML-0.8.4.tar.gz/download 
$ tar -zxvf PyXML-0.8.4.tar.gz $ cd PyXML-0.8.4/ 
$ sudo python2.5 setup.py install 
$ sudo ln -s /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils/    

Make sure to use python2.5 in the above as we need to reinstall PyXML in our Python 2.5. Once again, if the above was successful we are ready to move on to the next step. If not, we need to determine what went wrong.

Configuring the basics


We will need to create a Postgres user for OpenERP. The following commands should help with this.

$ sudo su postgres 
$ createuser openerp -P 
  Enter password for new role: (enter password here) 
  Enter it again: (enter password here) 
  Shall the new role be a superuser? (y/n) n 
  Shall the new role be allowed to create databases? (y/n) y 
  Shall the new role be allowed to create more new roles? (y/n) n 
$ exit    

The above simply creates a new Postgres user called openerp. sets a password for this user and defines some role permissions. To get OpenERP to run we need to not only tell it about the user we have just created, but also make it use the Python 2.5 we installed above.

$ sudo cp /usr/bin/openerp-server /usr/bin/openerp-server.orig 
$ sudo vi /usr/bin/openerp-server    

Change this line:

exec /usr/bin/python ./openerp-server.py $@    

to this:

exec /usr/bin/python2.5 ./openerp-server.py $@ 

Right, now that we have OpenERP using the correct version of Python we need to setup its configuration to use the correct username and password.

$ sudo vi /etc/openerp-server.conf    

Look for the following three lines (not necessarily together):

db_name = openerp 
db_user = openerp 
db_password =    

and change them as follows:

db_name = 
db_user = openerp 
db_password = (enter password here)    

By removing the db_name above we will be able to connect to different databases. All that remains is to configure Postgres and restart it.

$ sudo vi /etc/postgresql/8.3/main/pg_hba.conf    

Find the following line:

local all all ident sameuser    

and change it to:

local all all md5    

Restart Postgres and run the OpenERP server:

$ sudo /etc/init.d/postgresql-8.3 restart $ sudo /etc/init.d/openerp-server restart    

Conclusion


Now you should be able to run 'openerp-client' and create your first database. I will be exploring OpenERP use in my own business and publishing articles here about my progress.

Hope you found this article useful. Have fun using OpenERP to make your business even more efficient.


Print   —   Rate it:  up  down  flag this hub

Ask a Question

Comments

RSS for comments on this Hub

alancham  says:
2 months ago

good, weldone, i follow this article and i manage to start the openERP 5.0.0.3, Thank you.

alancham  says:
2 months ago

... but that is some error in "Install PyXML" procedure , it will give error for newbie.... Thank you.

phos4us profile image

phos4us  says:
2 months ago

Hi Alancham,

Did you get an error? If so what is it. Perhaps I can help.

Thanks for the nice comments, they are appreciated.

Regards

Andrew Higgs

Rohan  says:
2 months ago

Thanks for the article.

As a part II, here are some instructions for installing the web-client on Ubuntu 9.04:

http://openobject.com/forum/topic13138.html

Dummy123  says:
2 months ago

Hi phos4us

Thanks for the howto.

I also get the error in establishing the link. Is says "can not find the directory" for the destination although I traced the directory and it does exist. The file boolean.so is not in the destination directory.

phos4us profile image

phos4us  says:
2 months ago

Hi Dummy123,

Did you follow all the steps under 'Install PyXML'?

boolean.so is part of this package. Which directory was not found? Do you have the exact message?

Regards

Dummy123  says:
2 months ago

Hi phos4us

Yes I followed all the steps. I checked all typos and could not find an error. The directory not found was

/usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils/

I changed directory to this and it does exist.

What made me question this statement was that the path between python2.5 and 2.6 differed and that the target directory did not have the specified file.

The only possibility I can think of is that it must be a typo but this seems to elude me. Seeing that somebody else had the same problem I thought "Hey, maybe it is not my fault". I am fairly new to linux so typos are not uncommon.

Regards

mike.prinsloo  says:
5 weeks ago

There is an extra backslash on the ln line. Just remove the backslash between the source and target arguments and it should no longer complain.

bino  says:
4 weeks ago

Dear phos4us

Thankyou for your efforth on writing this tutorial.

I followed the "Install PyXML" part.

But just like what happend to Dummy123, that "/usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils/" doesn't exist.

I found that "boolean.so" IS at "/usr/lib/python2.5/site-packages/_xmlplus/utils/" ... there is no "oldxml" under "/usr/lib/python2.5/site-packages/"

So ... with this fact which one is right :

1. sudo ln -s /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/_xmlplus/utils/

2. sudo ln -s /usr/lib/python2.6/dist-packages/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/_xmlplus/utils/

3. sudo ln -s /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils /usr/lib/python2.5/site-packages/_xmlplus/utils/

4. sudo ln -s /usr/lib/python2.6/dist-packages/_xmlplus/utils /usr/lib/python2.5/site-packages/_xmlplus/utils/

5. sudo ln -s /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/_xmlplus/utils/boolean.so

6. sudo ln -s /usr/lib/python2.6/dist-packages/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/_xmlplus/utils/boolean.so

sincerely

-bino-

phos4us profile image

phos4us  says:
4 weeks ago

Sorry guys.

As Mike.Prinsloo has pointed out I have an extra '\' in the last command of the 'Install PyXML' section.

It originally read:

sudo ln -s /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so \ /usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils/

It should read:

sudo ln -s /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils/

I have corrected the article.

Regards

bino  says:
3 weeks ago

Hi phos4us

I followed all instruction,

There is no "oldxml" under my /usr/lib/python2.5/site-packages directory tree

Will it be

sudo ln -s /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/_xmlplus/utils/ ?

Sincerely

-bino-

Submit a Comment

Members and Guests

Sign in or sign up and post using a hubpages account.


optional


  • No HTML is allowed in comments, but URLs will be hyperlinked
  • Comments are not for promoting your hubs or other sites

working