Sie sind auf Seite 1von 16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

The Open Sourcerer


The Magic of Open Source About Are you an Open Sourcerer? This Theme Twitter Feed She sells sea shells Shopping lens for Gnome Shell

How to install OpenERP 7.0 on Ubuntu 12.04 LTS

Introduction
Welcome to the latest of our very popular OpenERP installation How Tos. The new release of OpenERP 7.0 is a major upgrade and a new Long Term Support release; the 7.0 Release Notes extend to over 90 pages! The most noticeable change is a complete re-write of the User Interface that features a much more modern look and feel. OpenERP 7.0 is not only better looking and easier to use, it also brings many improvements to the existing feature-set and adds a number of brand new features which extend the scope of the business needs covered by OpenERP. Integration of social network capabilities, integration with Google Docs and LinkedIn, new Contract Management, new Event Management, new Point of Sale, new Address Book, new Fleet Management, are only some of the many enhancements in OpenERP 7.0.

The How To
Following that introduction, I bet you cant wait to get your hands dirty Just one thing before we start: You can simply download a .deb package of OpenERP and install that on Ubuntu. Unfortunately that approach doesnt provide us (Libertus Solutions) with enough fine-grained control over where things get installed, and it restricts our flexibility to modify & customise, hence I prefer to do it a slightly more manual way (this install process below should only take about 10-15 minutes once the host machine has been built). So without further ado here we go:

Step 1. Build your server


I install just the bare minimum from the install routine (you may want to install the o p e n s s h s e r v e rduring the install procedure or install subsequently depending on your needs). After the server has restarted for the first time I install the o p e n s s h s e r v e rpackage (so we can connect to it remotely) and d e n y h o s t sto add a degree of brute-force attack protection. There are other protection applications available: Im not saying this one is the best, but its one that works and is easy to configure and manage. If you dont already, its also worth looking at setting up key-based ssh access, rather than relying on passwords. This can also help to limit the potential of brute-force attacks. [NB: This isn't a How To on securing your server...]
s u d oa p t g e ti n s t a l lo p e n s s h s e r v e rd e n y h o s t s

Now make sure your server has all the latest versions & patches by doing an update:
s u d oa p t g e tu p d a t e s u d oa p t g e td i s t u p g r a d e

Although not always essential its probably a good idea to reboot your server now and make sure it all comes back up and you can login via ssh. Now were ready to start the OpenERP install.

Step 2. Create the OpenERP user that will own and run the application
s u d oa d d u s e rs y s t e mh o m e = / o p t / o p e n e r pg r o u po p e n e r p

This is a system user. It is there to own and run the application, it isnt supposed to be a person type user with a login etc. In Ubuntu, a system user gets a UID below 1000, has no shell (its actually / b i n / f a l s e ) and has logins disabled. Note that Ive specified a home of / o p t / o p e n e r p , this is where the OpenERP server code will reside and is created automatically by the command above. The location of the server code is your choice of course, but be aware that some of the instructions and configuration files below may need to be altered if you decide to install to a different location. [Note: If you want to run multiple versions of OpenERP on the same server, the way I do it is to create multiple users with the correct version number as part of the name, e.g. openerp70, openerp61 etc. If you also use this when creating the Postgres users too, you can have full separation of systems on the same server. I also use similarly named home directories, e.g. /opt/openerp70, /opt/openerp61 and config and start-up/shutdown files. You will also need to configure different ports for each instance or else only the first will start.] A question I have been asked a few times is how to run the OpenERP server as the openerp system user from the command line if it has no shell. This can be done quite easily:
s u d os u-o p e n e r ps/ b i n / b a s h

This will s uyour current terminal login to the openerp user (the between s uand o p e n e r pis correct) and use the shell / b i n / b a s h . When this command is run you will be in openerps home directory: / o p t / o p e n e r p . When you have done what you need you can leave the openerp users shell by typing e x i t .

Step 3. Install and configure the database server, PostgreSQL


http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/ 1/16

3/12/2014
s u d oa p t g e ti n s t a l lp o s t g r e s q l

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

Then configure the OpenERP user on postgres: First change to the postgres user so we have the necessary privileges to configure the database.
s u d os u-p o s t g r e s

Now create a new database user. This is so OpenERP has access rights to connect to PostgreSQL and to create and drop databases. Remember what your choice of password is here; you will need it later on:
c r e a t e u s e rc r e a t e d bu s e r n a m ep o s t g r e sn o c r e a t e r o l en o s u p e r u s e rp w p r o m p to p e n e r p E n t e rp a s s w o r df o rn e wr o l e :* * * * * * * * E n t e ri ta g a i n :* * * * * * * *

Finally exit from the postgres user account:


e x i t

Step 4. Install the necessary Python libraries for the server


s u d oa p t g e ti n s t a l lp y t h o n d a t e u t i lp y t h o n d o c u t i l sp y t h o n f e e d p a r s e rp y t h o n g d a t a\ p y t h o n j i n j a 2p y t h o n l d a pp y t h o n l i b x s l t 1p y t h o n l x m lp y t h o n m a k op y t h o n m o c kp y t h o n o p e n i d\ p y t h o n p s y c o p g 2p y t h o n p s u t i lp y t h o n p y b a b e lp y t h o n p y c h a r tp y t h o n p y d o tp y t h o n p y p a r s i n g\ p y t h o n r e p o r t l a bp y t h o n s i m p l e j s o np y t h o n t zp y t h o n u n i t t e s t 2p y t h o n v a t n u m b e rp y t h o n v o b j e c t\ p y t h o n w e b d a vp y t h o n w e r k z e u gp y t h o n x l w tp y t h o n y a m lp y t h o n z s i

With that done, all the dependencies for installing OpenERP 7.0 are now satisfied (note that there are some new packages required since 6.1).

Step 5. Install the OpenERP server


I tend to use w g e tfor this sort of thing and I download the files to my home directory. Make sure you get the latest version of the application: at the time of writing this its 7.0. I got the download links from their download pages (note there are also d e b , r p mand e x ebuilds in this area too). There isnt a static 7.0 release tarball as such anymore, but there is a nightly build of the 7.0 source tree which should be just as good and will contain patches as and when things get fixed. The link below is to the source tarball for the 7.0 branch. Note: As an alternative method of getting the code onto your server, Jerome added a very useful comment showing how to get it straight from launchpad. Thanks!
w g e th t t p : / / n i g h t l y . o p e n e r p . c o m / 7 . 0 / n i g h t l y / s r c / o p e n e r p 7 . 0 l a t e s t . t a r . g z

Now install the code where we need it: c dto the / o p t / o p e n e r p /directory and extract the tarball there.
c d/ o p t / o p e n e r p s u d ot a rx v f~ / o p e n e r p 7 . 0 l a t e s t . t a r . g z

Next we need to change the ownership of all the the files to the OpenERP user and group we created earlier.
s u d oc h o w nRo p e n e r p :*

And finally, the way I have done this is to copy the server directory to something with a simpler name so that the configuration files and boot scripts dont need constant editing (I called it, rather unimaginatively, server). I started out using a symlink solution, but I found that when it comes to upgrading, it seems to make more sense to me to just keep a copy of the files in place and then overwrite them with the new code. This way you keep any custom or user-installed modules and reports etc. all in the right place.
s u d oc pao p e n e r p 7 . 0s e r v e r

As an example, should OpenERP 7.0.1 come out soon, I can extract the tarballs into /opt/openerp/ as above. I can do any testing I need, then repeat the copy command so that the modified files will overwrite as needed and any custom modules, report templates and such will be retained. Once satisfied the upgrade is stable, the older 7.0 directories can be removed if wanted. Thats the OpenERP server software installed. The last steps to a working system is to set up the configuration file and associated boot script so OpenERP starts and stops automatically when the server itself stops and starts.

Step 6. Configuring the OpenERP application


The default configuration file for the server (in / o p t / o p e n e r p / s e r v e r / i n s t a l l / ) is actually very minimal and will, with only one small change work fine so well simply copy that file to where we need it and change its ownership and permissions:
s u d oc p/ o p t / o p e n e r p / s e r v e r / i n s t a l l / o p e n e r p s e r v e r . c o n f/ e t c / s u d oc h o w no p e n e r p :/ e t c / o p e n e r p s e r v e r . c o n f s u d oc h m o d6 4 0/ e t c / o p e n e r p s e r v e r . c o n f

The above commands make the file owned and writeable only by the openerp user and group and only readable by openerp and root. To allow the OpenERP server to run initially, you should only need to change one line in this file. Toward to the top of the file change the line d b _ p a s s w o r d=F a l s e to the same password you used back in step 3. Use your favourite text editor here. I tend to use nano, e.g.
s u d on a n o/ e t c / o p e n e r p s e r v e r . c o n f

One other line we might as well add to the configuration file now, is to tell OpenERP where to write its log file. To complement my suggested location below add the following line to the o p e n e r p s e r v e r . c o n ffile:
l o g f i l e=/ v a r / l o g / o p e n e r p / o p e n e r p s e r v e r . l o g

Once the configuration file is edited and saved, you can start the server just to check if it actually runs.
s u d os u-o p e n e r ps/ b i n / b a s h / o p t / o p e n e r p / s e r v e r / o p e n e r p s e r v e r

If you end up with a few lines eventually saying OpenERP is running and waiting for connections then you are all set. On my system I noticed the following warning:
http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/ 2/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

2 0 1 2 1 2 1 91 1 : 5 3 : 5 1 , 6 1 36 5 8 6W A R N I N G?o p e n e r p . a d d o n s . g o o g l e _ d o c s . g o o g l e _ d o c s :P l e a s ei n s t a l ll a t e s tg d a t a p y t h o n c l i e n t f r o mh t t p : / / c o d e . g o o g l e . c o m / p / g d a t a p y t h o n c l i e n t / d o w n l o a d s / l i s t

The Ubuntu 12.04 packaged version of the python gdata client library is not quite recent enough, so to install a more up-to-date version I did the following (exit from the openerp users shell if you are still in it first):
s u d oa p t g e ti n s t a l lp y t h o n p i p s u d op i pi n s t a l lg d a t au p g r a d e

Going back and repeating the commands to start the server resulted in no further warnings
s u d os u-o p e n e r ps/ b i n / b a s h / o p t / o p e n e r p / s e r v e r / o p e n e r p s e r v e r

If there are errors, youll need to go back and find out where the problem is. Otherwise simply enter C T L + Cto stop the server and then e x i tto leave the openerp user account and go back to your own shell.

Step 7. Installing the boot script


For the final step we need to install a script which will be used to start-up and shut down the server automatically and also run the application as the correct user. There is a script you can use in / o p t / o p e n e r p / s e r v e r / i n s t a l l / o p e n e r p s e r v e r . i n i tbut this will need a few small modifications to work with the system installed the way I have described above. Heres a link to the one Ive already modified for 7.0. Similar to the configuration file, you need to either copy it or paste the contents of this script to a file in / e t c / i n i t . d /and call it o p e n e r p s e r v e r . Once it is in the right place you will need to make it executable and owned by root:
s u d oc h m o d7 5 5/ e t c / i n i t . d / o p e n e r p s e r v e r s u d oc h o w nr o o t :/ e t c / i n i t . d / o p e n e r p s e r v e r

In the configuration file theres an entry for the servers log file. We need to create that directory first so that the server has somewhere to log to and also we must make it writeable by the openerp user:
s u d om k d i r/ v a r / l o g / o p e n e r p s u d oc h o w no p e n e r p : r o o t/ v a r / l o g / o p e n e r p

Step 8. Testing the server


To start the OpenERP server type:
s u d o/ e t c / i n i t . d / o p e n e r p s e r v e rs t a r t

You should now be able to view the logfile and see that the server has started.
l e s s/ v a r / l o g / o p e n e r p / o p e n e r p s e r v e r . l o g

If there are any problems starting the server you need to go back and check. Theres really no point ploughing on if the server doesnt start

OpenERP 7 Database Management Screen If the log file looks OK, now point your web browser at the domain or IP address of your OpenERP server (or localhost if you are on the same machine) and use port 8069. The url will look something like this:
h t t p : / / I P _ o r _ d o m a i n . c o m : 8 0 6 9

What you should see is a screen like this one (it is the Database Management Screen because you have no OpenERP databases yet): What I do recommend you do at this point is to change the super admin password to something nice and strong (Click the Password menu). By default this password is just admin and knowing that, a user can create, backup, restore and drop databases! This password is stored in plain text in the / e t c / o p e n e r p s e r v e r . c o n ffile; hence why we restricted access to just openerp and root. When you change and save the new password the / e t c / o p e n e r p s e r v e r . c o n ffile will be re-written and will have a lot more options in it. Now its time to make sure the server stops properly too:
s u d o/ e t c / i n i t . d / o p e n e r p s e r v e rs t o p

Check the logfile again to make sure it has stopped and/or look at your servers process list.

Step 9. Automating OpenERP startup and shutdown


If everything above seems to be working OK, the final step is make the script start and stop automatically with the Ubuntu Server. To do this type:
s u d ou p d a t e r c . do p e n e r p s e r v e rd e f a u l t s

You can now try rebooting you server if you like. OpenERP should be running by the time you log back in. If you type p sa u x|g r e po p e n e r pyou should see a line similar to this:
o p e n e r p1 4 9 10 . 11 0 . 62 0 7 1 3 25 3 5 9 6?S l2 2 : 2 30 : 0 2p y t h o n/ o p t / o p e n e r p / s e r v e r / o p e n e r p s e r v e rc/ e t c / o p e n e r p s e r v e r . c o n f

Which shows that the server is running. And of course you can check the logfile or visit the server from your web browser too.

http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/

3/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

OpenERP 70 Main Setup Screen Thats it! Next I would suggest you create a new database filling in the fields as desired. Once the database is initialised, you will be directed straight to the new main configuration screen which gives you a fell for the new User Interface in OpenERP 7 and shows you how easy it is to set up a basic system. Tags: Libertus, Linux, OpenERP, Ubuntu
This entry was posted on Saturday, December 22nd, 2012 at 18:05 by Alan Lord and is filed under FLOSS in the news, Libertus, OpenERP, Ubuntu. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

401 Comments
Older Comments Newer Comments Subash says: January 23, 2013 at 11:23 Hi Alan, Just want to know whether openerp 7 works with ubuntu 10.04.. i tried to install but not working Reply Subhash says: January 23, 2013 at 14:05 sudo: /etc/sudoers.d/README is mode 0777, should be 0440.. I got this error while installing and I got stuck.. Please help me.. Reply john says: January 23, 2013 at 14:24 Thanks for the info alan. my 2 instance running fine now. great article. Thanks. Reply Robin St.Clair says: January 23, 2013 at 16:11 Hi I wonder if you have any experience of installing OpenERP 7 over PostgreSQL 9.2.2? Before fumbling my way through this (I have a mostly Sybase 3 tier background), I thought Id find out if there are any real gotchas. I would like to start with the most recent versions of everything as I have to create some interfaces down the track and Id prefer to avoid any end of life situations. Any pointers you could give would be much appreciated. R+C Reply Bruce says: January 23, 2013 at 19:57 Hi. Ive followed your posts for openerp installations since version 6.0; very helpful, thank you very much for taking the time. I noticed that you are using port 8070 to connect to the server but in the older versions 8069 was used. Ive followed your steps for version 7 and this time was also using port 8069 that I was able to connect to the server not 8070. I this an error in the post? Thanks again Reply Alan Lord says: January 23, 2013 at 21:03 Ill check that from a clean install (when I get chance). I thought the default port number had changed but you may be right Thanks for pointing it out anyway.
http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/ 4/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

Reply Subhash says: January 24, 2013 at 9:41 Hi, I am also able to connect to port: 8069. Reply Carsten Laun-De Lellis says: January 23, 2013 at 22:35 Hi all First of all I want to say thankx for that great how-to. I tried to install openerp 7.0 on ubuntu 12.04 LTS. I am running in the following error message, whenever I try to create a database. DataError: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) HINT: Use the same encoding as in the template database, or use template0 as template. Any hints? Thank you in advance. Carsten Reply liam says: February 21, 2013 at 23:15 Hi I solved with this: http://www.openerp.bg/%D0%B1%D0%BB%D0%BE%D0%B3/item/163%D0%BF%D1%80%D0%BE%D0%BC%D1%8F%D0%BD%D0%B0-%D0%BD%D0%B0-postgresql-default-template0-%D0%BD%D0%B0-utf8encoding Reply Subhash says: January 24, 2013 at 9:46 Alan, Thanks a lot for the steps. I have successfully completed installing Openerp7 in ubuntu 12.04. But i am having a problem.Each time when i am updating the module the following script error is shown:

https://apps.openerp.com/web/webclient/js? mods=web_diagram,process,web_graph,web_view_editor,web_calendar,base,web_kanban,base_setup,auth_oauth,mail,email_template,auth_signup,auth_oauth_signup,web Why this message is shownCould you please help me? Thanks & Regards Reply GK says: January 24, 2013 at 12:48 I am also having the same problem. Reply GK says: January 24, 2013 at 11:18 Hi Alan I have both openerp 6.0.3 and 7 installed in my computer. but when starting 6.0.3 web client a warning message is shown. Your OpenERP system is vulnerable to a major security issue, but you dont have an OpenERP Enterprise contract. You should update to 6.0.3 as soon as possible." What does it mean? The web client is actually running on 6.0.3. Please help. Reply Aasim Ahmed Ansari says: January 24, 2013 at 20:08 Hi, I installed OERP 7.0 and ran it as per your instructions. But when I click on Manage Database page, it takes me to blank screen. Can you help me out please? Reply Cristian says: January 24, 2013 at 21:26 Good notes Alan!
http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/ 5/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

You might add:


s u d oc h o w n6 4 4/ e t c / i n i t . d / o p e n e r p s e r v e r

and possibly:
s u d oc h o w no p e n e r p : o p e n e r p/ v a r / l o g s / o p e n e r p s e r v e r . l o g

I still get: openerp.addons.google_docs.google_docs: Please install latest gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list when I run it straight from the directory it resides: ./openerp-server no biggie great work Thanks Cristian Reply Jan NL says: January 24, 2013 at 23:43 Thanks for this very nice install guide. For me it was 20 years ago I tried to install Linux, so Linux is very new to me now, and you helped me out with this page to install OpenERP. I only struggled with the port number 8070 > 8069 but I saw the solution in the logfile. Reply Bell says: January 25, 2013 at 3:23 Thank you very much, this is the holy bible of openerp 7 and you are the prophet!!!! can i translate to spanish and put in my blog ? Thanks again!! Reply Alan Lord says: January 25, 2013 at 9:04 @Bell, Thanks for the praise (although I think prophet is just a tad OTT )

Anyway, yes of course you can translate and reproduce it. Our own blog posts and images are licensed under CC-BY-SA (http://creativecommons.org/licenses/by-sa/3.0/) which basically you means you can do what you like with it as long as: 1. you provide proper attribution 2. you issue your derived work under the same license terms Have fun and thanks for asking! Reply Mayuran says: January 26, 2013 at 16:40 First of all thank you for fantastic post on installing openerp. I was able to install and run the system successfully. But when i try to install any modules, it is throwing error message like this You try to install module base_setup that depends on module web_kanban. But the latter module is not available in your system. Reply yari says: January 28, 2013 at 14:10 Good tutorial. Managed to get to step 6 and got same message about updating gdata. Followed your instructions sudo apt-get install python-pip sudo pip install gdata upgrade And after that when I tried to restart opererp, got the same warning message about gdata-python-client. I manually downloaded the package and succesfully installedsame result, Im still getting the warning message. Any clue on what could be wrong? Reply kdclaver says: January 28, 2013 at 22:00 Very good step by step installation. All things happen as you said but I get a report of little error after testing this command : sudo /etc/init.d/openerp-server stop Ive taken the script on your website as you mentionned it and this command report an error like below: sudo /etc/init.d/openerp-server stop /etc/init.d/openerp-server: 14: /etc/init.d/openerp-server: INFO: not found /etc/init.d/openerp-server: 25: /etc/init.d/openerp-server: Syntax error: ( unexpected root@openerp:/var/log/openerp# Without this small error I appreciate your effort to share this very beautiful howto.
http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/ 6/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

Thanks more !!! Reply Alan Lord says: January 29, 2013 at 10:56 @kdclaver You must have broken something when downloading the script. The script works fine from here and for many others. It should look like this: http://paste.ubuntu.com/1585446/ Reply kdclaver says: January 31, 2013 at 16:23 Sorry to tell you that the script doesnt work, I get another error like this : /etc/init.d/openerp-server start Starting openerp-server: start-stop-daemon: start needs exec or startas Try start-stop-daemon help for more information. /etc/init.d/openerp-server: 47: /etc/init.d/openerp-server: chuid: not found /etc/init.d/openerp-server: 48: /etc/init.d/openerp-server: exec: not found openerp-server. root@openerp:~# I have done my script looks like the Ubuntu Pastebin link you give but when I try to make this command /etc/init.d/openerp-server start I get an error. Thanks more to help me solve this error. Without this error about the automatic start and stop the installation work fine and Im happy to show that they have introduced OHADA/SYSCOA in this version. Regards Reply Alan Lord says: January 31, 2013 at 21:46 It does work! This howto is read by more than 500 new visitors per day and most seem to think it works fine. Reply kdclaver says: February 1, 2013 at 23:57 As you say I can confirm that it works for me too when I launch maunually /opt/openerp/server/openerp-server. But when I try to launch the script I get everytime the same error. I can copy and paste the script here to show you how its writing root@openerp:/etc/init.d# cat openerp-server #!/bin/sh ### BEGIN INIT INFO # Provides: openerp-server # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Should-Start: $network # Should-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Enterprise Resource Management software # Description: Open ERP is a complete ERP and CRM software. ### END INIT INFO PATH=/bin:/sbin:/usr/bin DAEMON=/opt/openerp/server/openerp-server NAME=openerp-server DESC=openerp-server # Specify the user name (Default: openerp). USER=openerp # Specify an alternate config file (Default: /etc/openerp-server.conf). CONFIGFILE=/etc/openerp-server.conf # pidfile PIDFILE=/var/run/$NAME.pid # Additional options that are passed to the Daemon. DAEMON_OPTS=-c $CONFIGFILE [ -x $DAEMON ] || exit 0 [ -f $CONFIGFILE ] || exit 0 checkpid() { [ -f $PIDFILE ] || return 1 pid=`cat $PIDFILE` [ -d /proc/$pid ] && return 0 return 1
http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/ 7/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

} case ${1} in start) echo -n Starting ${DESC}: start-stop-daemon start quiet pidfile ${PIDFILE} \ chuid ${USER} background make-pidfile \ exec ${DAEMON} ${DAEMON_OPTS} echo ${NAME}. ;; stop) echo -n Stopping ${DESC}: start-stop-daemon stop quiet pidfile ${PIDFILE} \ oknodo echo ${NAME}. ;; restart|force-reload) echo -n Restarting ${DESC}: start-stop-daemon stop quiet pidfile ${PIDFILE} \ oknodo sleep 1 start-stop-daemon start quiet pidfile ${PIDFILE} \ chuid ${USER} background make-pidfile \ exec ${DAEMON} ${DAEMON_OPTS} echo ${NAME}. ;; *) N=/etc/init.d/${NAME} echo Usage: ${NAME} {start|stop|restart|force-reload} >&2 exit 1 ;; esac exit 0 root@openerp:/etc/init.d# kdclaver says: February 2, 2013 at 0:05 Dear all, I have found the error and solve it. I have just combine line 47 and 48 to have only one command line and now the script run without error : below the line I combine start) echo -n Starting ${DESC}: start-stop-daemon start quiet pidfile ${PIDFILE} chuid ${USER} background make-pidfile exec ${DAEMON} ${DAEMON_OPTS} echo ${NAME}. ;; Thanks more again and again and again for this great howto. Alan Lord says: February 2, 2013 at 10:00 Well, I have no idea why you need to do that. \ is the standard line continuation character this should just work What language is your Ubuntu system using? And also, did you try and edit the file with a Windows editor at all? Subhash says: January 29, 2013 at 5:15 All my issues were solved. Alan u r great. Reply Ryan says: January 29, 2013 at 7:47 thanks alot, great tutorial, thanks for taking the time to put this up !! Reply nico says: January 29, 2013 at 14:07 Thanks a lot for this tutorial, it helps me a lot for the school where i have install it (sorry for my english !) greetings !!
http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/ 8/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

Reply ildrugo says: January 30, 2013 at 12:05 Guys, there is an error in the custom init script it is # Specify the user name (Default: openerp). USER=openerp while it should be # Specify the user name (Default: openerp). USER=openerp Otherwise using non standard user name openerp wont work Reply Dario says: January 30, 2013 at 12:40 Thanks for the tutorial!! In your installation the modules are in /opt/openerp/server/openerp/addons, but I dont know where is the file with this rute to add new folder addons (or how do it) And the changes in server/openerp/addons/ never appear on the module list (from new modules to change de author of an existing module), I updated de module list with the technical Features and cheked the permissions and the owner of the folder and files Reply Dario says: February 4, 2013 at 8:34 Clic on installed modules, and then, in the search box, quit the instaled filter then you can install the foraign modules (in the Aplications page, only are the modules online. Reply Jean-Bruno says: January 30, 2013 at 12:48 wow a perfect and practical job. The Jerome added dont worked for me but i finally install it ! Many thanks Reply Mahmood Akhalwaya says: January 31, 2013 at 14:35 Thanks for the sterling job done with this tutorial. Worked like a bomb. So simple that even a newbie like me with zero Linux experience got OpenERP up and running first time right Reply Luis Planes says: February 1, 2013 at 12:02 Very good. Thanks. But when running sudo apt-get install postgresql after step 2 sudo su openerp-s / bin / bash, asks the key openerp user. There you go first with openerp user. Reply Alan Lord says: February 1, 2013 at 19:14 @Luis The final sentence of step 2: When you have done what you need you can leave the openerp users shell by typing e x i t . Reply Kwasi says: February 1, 2013 at 14:11 Thanks Alan, the tutorial is a great one. one question, can the database from 6.1 be import directly into 7? or maybe upgrade the 6.1 server by copying the version 7 files into the folder. thnaks in advance. Reply Alan Lord says: February 1, 2013 at 19:15 @Kwasi No. Upgrading any ERP system is non-trivial. OpenERP s.a will migrate your database if you have an OpenERP Enterprise agreement, or you will need to do it manually and very carefully.
http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/ 9/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

Reply Edwin says: February 3, 2013 at 5:17 Hi Alan. Ive few words to describe your post: Works like a charm! Really nice. Ive used an old Lenovo PC with Ubuntu Server 12.10 without problems. Thank you very much. Reply Antoine says: February 4, 2013 at 17:29 Thank you, very good, simple, complete tutorial Works fine ! Reply Marco says: February 7, 2013 at 6:09 Hi! I installed the way you said, and i got strange results. The server seems to be working fine, since i got the log file and everything is running smooth in it. However when i connect to the adequate port in the web browser i just see a white page. I dont know whats happening. To solve te problem i installed java 7, but its not working at all. However when i see the page in html, seems to make sense, the page is there, but i cannnot see it. Can you help me? . Im runnning OpenErp in a Debian squeeze. Reply Alan Lord says: February 7, 2013 at 8:13 @Marco, Sorry but I have no idea based on your description. Why on earth did you install Java? OpenERP has no dependencies on that as far as I am aware. Also, I have not tested this on, nor do I personally use Debian, so it is hard for me to suggest much other than to check the logs carefully and try turning up the reporting level to debug etc Reply Saloc67 says: February 8, 2013 at 11:04 Hi. Thanks a lot for these instructions for a newbie, they are really great. I believe I followed them to the letter, on Ubuntu 12.10. When I try create a database, I get this below. Any idea where the permissions have gone wrong? Thanks. Client Traceback (most recent call last): File /opt/openerp/server/openerp/addons/web/http.py, line 195, in dispatch response["result"] = method(self, **self.params) File /opt/openerp/server/openerp/addons/web/controllers/main.py, line 719, in create params['create_admin_pwd']) File /opt/openerp/server/openerp/addons/web/session.py, line 31, in proxy_method result = self.session.send(self.service_name, method, *args) File /opt/openerp/server/openerp/addons/web/session.py, line 98, in send raise xmlrpclib.Fault(AccessDenied, openerp.tools.ustr(e)) Server Access denied. Reply Saloc67 says: February 8, 2013 at 11:20 Hmmm, I found that if I shutdown the server (it had started automatically after the reboot), and then manually switched to the openerp user and started openerp manually, everything works. Sounds like a problem with how the boot startup permissions? Reply PowrrrPlay says: February 8, 2013 at 18:19 Hello, these are great instructions. But I am having a problem with multiple instances on the same ubuntu system. I set up a demo system on ubuntu 12.04. I did not use the openerp naming standard as per the instructions. I changed everything to demo7 with seperate logs as per the multiple instances statement. Works fantastic. Thinking of multiple systems on the same ubuntu 12.04 system I then created a production system, prod7a. As above I changed everything in the install to do with openerp to prod7a, including the logs. Fantasic! Problem is, when I try to start the second instance, as it does not matter which one is started first, I get an error. Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application

http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/

10/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

Reply PowrrrPlay says: February 8, 2013 at 18:34 As for running multiple instances with your /ect/init.d/openerp-server start command, this is the issue for running more than one server. OSError: [Errno 13] Permission denied: /tmp/oe-sessions-root/tmpalaF7O.__wz_sess Two or more root instances trying to create this file. Reply Tim Pietrusky says: February 13, 2013 at 22:03 This works for me too. Reply PowrrrPlay says: February 9, 2013 at 17:55 Ubuntu 12.04, multi openerp running as demo and proda. The second system I start up gets this error number OSError: [Errno 13] Permission denied: /tmp/oe-sessions-root/tmpmAQro4.__wz_sess. I have rebooted the system but still get this error on the second system started. It does not matter which system I start second. After a system reboot, the owner of oe-sessions-root is the first multi system started (either demo or proda) with 0700 permissions. Reply Youl says: February 10, 2013 at 11:40 Very Good How To ! Everything work fine, i dont know what i have miss i connect on port 8069 not 8070, but isnt a problem i will install ssl proxy from apache. The hard work is now to migrate data from 6.1 Thank You Opensourcerer for your share. Reply JohnB says: February 12, 2013 at 9:04 works like a charm. Thank you!!! Reply Mahmood Akhalwaya says: February 12, 2013 at 15:11 Help me please. I have successfully installed OpenERP 6.11 and 7.0 as standalone on Ubuntu Server 12.04. I wanted to try my hand at having both running concurrently as I know 6.11 and would like to use it for reference when using 7.0. I am installing on my current Ubuntu server 12.04 with OpenERP 6.11 running perfectly. However I repeatedly get the following error whent creating the new datbase user in step 3 : createuser: could not connect to database postgres: FATAL authentication failed for user postgres70 I have created OpenERP user: openerp70 in group openerp70(or should I have created this user in the group openerp). I entered the following to create the new database user: createuser createdb username postgres70 no-createrole no-superuser pwprompt openerp70 Is this correct? I must be using the 70 user suffix wrong. Also i have checked Postgres is running. Reply Mahmood Akhalwaya says: February 12, 2013 at 15:14 I forgot to mention that I used your 6.1 tutorial and already have one postgres user named postgres as per that tutorial. Reply Mahmood Akhalwaya says: February 12, 2013 at 15:17 My apologies the error message should read: createuser: could not connect to database postgres: FATAL Peer authentication failed for user postgres70 Reply Alan Lord says: February 12, 2013 at 20:35 Creating a new user openerp70 with group openerp70 is fine.
http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/ 11/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

When configuring the postgres user you have an error: username should be postgres not postgres70 the final username openerp70 on that line is correct. You will probably need to clean up your postgres configuration I am not sure what using postgres70 will do in that scenario. Once you have that done, you must create separate config files, init scripts and log directories/files etc. chowned to the appropriate users to run the two OpenERP systems independently of each other. They will need to be using different ports or the 2nd one to fire will fail. Have fun. Reply Mahmood Akhalwaya says: February 13, 2013 at 8:59 Thanks Alan Ill retry later today. I wonder if it would do anything at all. I thought it might be because I was using a nonexistent user, thats why there was failure to authenticate. I wanted to try it with the postges user but wasnt sure. Anways Ill double check everything later today. Reply PowrrrPlay says: February 13, 2013 at 3:29 Hi Allen, Just a note to reiterate the problem I tried to describe when starting multiple instances of Openerp on ubuntu 12. If you start your instances as /ect/init.d/client1 start and /etc/init.d/client2 start there will be a conflict/error with /tmp. Reading Reading Reading. My thick skull. I am not sure where I found it but I just want to reiterate to avoid this ownership confilict when starting multiple instances on /tmp use the service command service client1 start service client2 start and everything is golden. Sorry for my confusing posts. Cheers. Reply Alan Lord says: February 13, 2013 at 8:08 @PowrrrPlay using service or /etc/init.d/filename should not make any real difference from what I can tell. This issue is ownership of the files in /tmp and having previously, at some point, started one or other of the systems with the wrong user. This creates the structure in /tmp with the wrong permissions. Probably the easiest way to fix this? Stop all instances of OpenERP, delete *everything* openERP related from /tmp and then restart your OpenERP instances. Reply Th Olux says: February 13, 2013 at 8:55 I followed your guidelines exactly, and I can tell you that it works flawlessly on Ubuntu 12.10 as well! Not even a single error during the installation process. The server uses port 8069 though (not 8070.) Thanks a lot! Using your installation procedure I could finally install OpenERP for the first time! Reply Francois says: February 13, 2013 at 14:43 Hi all, How its possible to install a module extra for the openerp7? I have unzip more addons on /opt/openerp/server/openerp/addons/ then i have change chmod -R 775 and chown -R openerp: but nothing addons when i update the module liste on addons not installed. Reply Francois says: March 2, 2013 at 17:25 Have you a solution for my problem? Thanks for all Reply LookingForSSL says: February 13, 2013 at 16:42 Hey. In the first place id like to thank for this wonderful explained perfect working tutorial. I try to figure out how to establish a TLS/SSL connection between a normal browser and my OpenERP instance. Am i forced to use something like the openerpweb-client like in the Version 6 days? I cat find any informations concerning OpenERP7 and SSL so id be really glad, if you can give me some hints. Thanks in advance!
http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/ 12/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

Reply Alan Lord says: February 14, 2013 at 8:25 Try this: http://www.theopensourcerer.com/2012/03/how-to-openerp-6-1-ubuntu-10-04-lts-nginx-ssl-reverse-proxy/ Its for 6.1 but the principles should be similar if not exactly the same. Reply Ren since Mxico says: February 14, 2013 at 22:28 GUAU!! Excelent Just !NO USE THE JEROME WAY! If you do that take you have to be an expert in OpenERP in order to put the right Paths. If not, just follow the tutorial word by word. Thanks! Reply Mahmood Akhalwaya says: February 18, 2013 at 8:50 I have successfully installed OpenERP 7.0 on Ubuntu server 12.04 and am running it well with Chrome. However when trying to do an update from a web client on my LAN via the settings screen, I get the following error: Client Traceback (most recent call last): File /home/odoo/source/web/addons/web/http.py, line 190, in dispatch self.jsonrequest = simplejson.loads(request, object_hook=reject_nonliteral) File /usr/lib/python2.7/dist-packages/simplejson/__init__.py, line 468, in loads return cls(encoding=encoding, **kw).decode(s) File /usr/lib/python2.7/dist-packages/simplejson/decoder.py, line 406, in decode obj, end = self.raw_decode(s) File /usr/lib/python2.7/dist-packages/simplejson/decoder.py, line 426, in raw_decode raise JSONDecodeError(No JSON object could be decoded, s, idx) JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0 Ive double checked all the steps and confirmed that all steps were followed correctly. Can I do an update by downloading the latest build and extract it into my install directory? I know this is not the ideal situation, the above error should be resolved. Will this affect my Reply Mahmood Akhalwaya says: February 18, 2013 at 8:52 Please ignore last line above. Reply Mahmood Akhalwaya says: February 19, 2013 at 12:01 The above error is caused by inconsistent data in the demo database, ie if you load demonstration data when creating a new database. To solve just drop any databases containing demonstration data. Reply kdclaver says: February 18, 2013 at 18:09 Dear all, I want to install openerp on my dedicated server with public IP address how can I redirect http://my-address:8069 to https://my-address:8069 ???? Thanks more for your feedback Reply smK says: February 20, 2013 at 10:51 Thank you so much, I had so many problems with windows version. With your tutorial I could install OpenERP on my dedicated server and it works properly ! Reply Daniel says: February 23, 2013 at 2:58 Hi, I have problem installing openerp 7 on my synology nas, The server can run just as a service cant: Oxygen> openerp-server start Traceback (most recent call last):
http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/ 13/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

File /usr/local/bin/openerp-server, line 4, in import pkg_resources File /usr/local/lib/python2.7/site-packages/pkg_resources.py, line 2709, in working_set.require(__requires__) File /usr/local/lib/python2.7/site-packages/pkg_resources.py, line 686, in require needed = self.resolve(parse_requirements(requirements)) File /usr/local/lib/python2.7/site-packages/pkg_resources.py, line 584, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: psutil Other problem is how can i modifie the client (database manager) username & pass? cause i cant set privileges correctly to hide all other table in the pg i need that to able to set the client portal option.. Thx Reply christian says: March 2, 2013 at 20:29 I try it with ubuntu 12.10 but its not working Step5:when I run the sudo cp -a openerp-7.0 server the system cant evaluate openerp3 & it gave me the following error:no file or folder of this type Reply Alan Lord says: March 3, 2013 at 14:40 It is saying that it cant find the directory in your command. You are either in the wrong directory to start with or it isnt called openerp-7.0. Reply Benoy says: March 4, 2013 at 8:19 Thatks for providing this wonderful support. Reply MYstIC G says: March 5, 2013 at 13:01 Thanks for writing this up, the OpenERP website has been extremely unhelpful in this regard for version 7. Reply lucas oketch says: March 9, 2013 at 20:04 where do i find mx module Reply Amir says: March 11, 2013 at 23:45 Thank you very much. I managed to get it up and running without much fuss. Good work sir. Reply zainudin says: March 12, 2013 at 5:59 Hi,can anyone help me with this error : 2013-03-12 05:45:48,548 2205 INFO ? openerp: OpenERP version 7.0alpha-20130125-000101 2013-03-12 05:45:48,550 2205 INFO ? openerp: addons paths: /opt/openerp/server/openerp/addons 2013-03-12 05:45:48,551 2205 INFO ? openerp: database hostname: localhost 2013-03-12 05:45:48,552 2205 INFO ? openerp: database port: 5432 2013-03-12 05:45:48,553 2205 INFO ? openerp: database user: openerp 2013-03-12 05:45:49,744 2205 CRITICAL ? openerp.modules.module: Couldnt load module web 2013-03-12 05:45:49,747 2205 CRITICAL ? openerp.modules.module: No module named unittest2 2013-03-12 05:45:49,748 2205 ERROR ? openerp.service: Failed to load server-wide module `web`. The `web` module is provided by the addons found in the `openerp-web` project. Maybe you forgot to add those addons in your addons_path configuration. Traceback (most recent call last): File /opt/openerp/server/openerp/service/__init__.py, line 59, in load_server_wide_modules openerp.modules.module.load_openerp_module(m) File /opt/openerp/server/openerp/modules/module.py, line 405, in load_openerp_module __import__(openerp.addons. + module_name) File /opt/openerp/server/openerp/modules/module.py, line 133, in load_module mod = imp.load_module(openerp.addons. + module_part, f, path, descr) File /opt/openerp/server/openerp/addons/web/__init__.py, line 3, in import cli File /opt/openerp/server/openerp/addons/web/cli/__init__.py, line 1, in import test_js File /opt/openerp/server/openerp/addons/web/cli/test_js.py, line 5, in import unittest2
http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/ 14/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

ImportError: No module named unittest2 2013-03-12 05:45:49,929 2205 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069 2013-03-12 05:45:49,953 2205 INFO ? openerp: OpenERP server is running, waiting for connections Reply dalejsa says: March 12, 2013 at 11:48 Geez I wanna buy you a beer so much right now. Thanks for this info The only thing for users to note is that the directory openerp-7.0 WILL DIFFER depending on the name of the nightly build you download. I ran vm (renamed) the directory openerp-7.0-(long date here) to the simple name openerp-7.0 and the rest of your instructions worked like a bomb Thanks again Reply Alan Lord says: March 12, 2013 at 18:41 Beer is great. If you want to you can send a few bucks to our PayPal account (paypal@libertus.co.uk) Thats good advice about the directory name. Thanks for pointing it out! Reply hassan says: March 14, 2013 at 19:02 how can I run the OpenERP server through eclipse IDE with openerp as the database user? Reply Older Comments Newer Comments

Leave a Reply
Name (required) Mail (will not be published) (required) Website XHTML: You can use these tags:
< ah r e f = " "t i t l e = " " >< a b b rt i t l e = " " >< a c r o n y mt i t l e = " " >< b >< b l o c k q u o t ec i t e = " " >< c i t e >< c o d e >< d e ld a t e t i m e = " " >< e m >< i >< qc i t e = " " >< s t r i k e >< s t r o n g >

Notify me of follow up comments via e-mail


Submit Comment

Reading or Read

Tag Cloud
#ukgovOSS Alfresco Asterisk Asus Baiting Becta Canonical Chilli Education EU Fedora Firefox Free Software Gimp Glyn Moody
Google

Government GPL ISO Joomla! Licenses

Linux low power server Microsoft Mono Mozilla Novell ODF OOXML OpenERP OpenOffice.org Open
Samba Schools The Open Learning Centre Thunderbird

Source Open Standards

Packt Patents

Ubuntu UK

Untangle Vista

Windows Wordpress

Blogroll
http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/ 15/16

3/12/2014

The Open Sourcerer How to install OpenERP 7.0 on Ubuntu 12.04 LTS

Andy Updegrove Bob Sutor Confused of Calcutta Groklaw Launchpad Blog Naked Computers Open Source Schools OPEN Planet Ubuntu Planet Ubuntu UK Planet Ubuntu Users Rob Weir The Linux Blog The Way Out The webbook blog

Recent Comments
Mark on Unity Window Quicklists Diego Hernandez on How to install OpenERP 7.0 on Ubuntu 12.04 LTS Patrik Hermansson on Remote Firefox over X/SSH Alan Lord on How to install OpenERP 7.0 on Ubuntu 12.04 LTS chintan on How to install OpenERP 7.0 on Ubuntu 12.04 LTS

License

The content of this website is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

Feeds and Services


Log in Entries RSS Comments RSS WordPress.org Site Contents: 2012 The Open Sourcerer Wordpress Theme: The Open Learning Centre

Wed Mar 12th 7:35:15 UTC 2014

http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/

16/16

Das könnte Ihnen auch gefallen