Installing OpenERP on Ubuntu 9.04
By phos4us
Please note : this article has been updated for Ubuntu 9.10.
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:
- OpenERP does not yet work with Python 2.6, which is now the Ubuntu default
- 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.
Comments
... but that is some error in "Install PyXML" procedure , it will give error for newbie.... Thank you.
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
Thanks for the article.
As a part II, here are some instructions for installing the web-client on Ubuntu 9.04:
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.
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
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
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.
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-
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
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-
Thank you!
Hi Katje,
Thats a pleasure.
Thank you for posting a comment
So i installed openerp on ubuntu. Now i want it to be available for access from all over the internet, so i can manage it online. what should i do?
Hi Furaana,
I have not tried this, but I would imagine that you would just need to open up port 8069 and 8070 depending on the connection you are using or want to make.
Regards
i finished all steps successfully but i want to know what should i do to start
what i write in my url to start the application
Hi Some One,
You would need to run 'sudo /etc/init.d/openerp-server start' to run the server. The gtk client is available on the menu under 'Internet'.
This HOWTO does not install the OpenERP web interface.
Regards
hello
i need to install payroll module in openerp could you help me in installing it
Hi Alaa,
The Payroll module id still under development, What problems are you having installing it?
Regards
hi all
i need the package of payroll module in order to installing it and i have some problems in the application
in project management-->time management-->my timeboxes
the errors are
Traceback (most recent call last):
File "/usr/lib/openerp-server/netsvc.py", line 244, in dispatch
result = LocalService(service_name)(method, *params)
File "/usr/lib/openerp-server/netsvc.py", line 73, in __call__
return getattr(self, method)(*params)
File "/usr/lib/openerp-server/service/web_services.py", line 583, in execute
res = service.execute(db, uid, object, method, *args)
File "/usr/lib/openerp-server/osv/osv.py", line 59, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/lib/openerp-server/osv/osv.py", line 118, in execute
res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/lib/openerp-server/osv/osv.py", line 110, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/lib/openerp-server/addons/project_gtd/project_gtd.py", line 141, in fields_view_get
xarch, xfields = self._view_look_dom_arch(cr, uid, doc, view_id, context=context)
File "/usr/lib/openerp-server/osv/orm.py", line 1049, in __view_look_dom_arch
fields_def = self.__view_look_dom(cr, user, node, view_id, context=context)
File "/usr/lib/openerp-server/osv/orm.py", line 972, in __view_look_dom
if node.tag == 'field':
AttributeError: Document instance has no attribute 'tag'
could you help me please
Hi nourad
I assume you are the same person as alaa.
The Payroll module is still in development. I suggest you look to one of the Openerp forums (http://openobject.com/forum/index.php) for help. Or contact the developer directly.
Regards
Thanks for this informative and geeky hub.
No problem. :-) I hope it was useful.
Regards
Andrew
bino says:
4 months 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-
I am having the same issue ??
any suggetions ?
One more thing could it be because i am using ubuntu server 9.10 ??
and i have a production server running in the office and i checked all they have don is open the port 8070 on in the firewall and forwarded that port to the localserver and we are able to connect to it from any where ....
Thanks
Hi Mustafa,
Just a couple of things need to be changed to install on 9.10.
Just before you 'sudo ln -s /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils/' run this command 'mkdir -p /usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils/'.
I also found that when I was editing the pg_hba.conf file I just added the line 'local all all md5' as I could not find the line to alter.
The only other thing seems to be the need to change the references to postgresql from 8.3 to 8.4.
Hope this helps. I will probably flesh this out a bit a make a new hub with all the corrected commands etc.
Have fun.
Regards
Andrew
Hi,
I have install the latest version of openERP on Fedora 10 successfully.I have the videos below of sales and purchase flow.
I can email you all the steps of installing openERP.Also, how to run openERP server and openERP web as service on fedora.
http://opensourcebista.blogspot.com/2010/03/opener
Open ERP sales and purchase flow
Sales flow
http://www.youtube.com/results?search_query=OpenER
Purchase flow
Thanks Girish.
Regards
Well done. Great and most useful notes.
I have it running etc but did you have any trouble downloading their sample Db? Took me many attempts. How are you going with the evaluation of the software?
Hi Hamish,
I have been very side tracked with other projects. Haven't really had much time to get to evaluating or customizing. Hopefully I will be able to get to that at some stage.
Regards
Hello,
My OpenERP 6 installation guide on Fedora 16 - http://www.bluewhaleseo.com/blog/installing-opener
Enjoy! :)
Regards,
alancham 2 years ago
good, weldone, i follow this article and i manage to start the openERP 5.0.0.3, Thank you.