How to install OpenERP 6.0 on Ubuntu 10.04 LTS Server (Part 1)

Update: 22/02/2012. OpenERP 6.1 was released today. I’ve written a howto for this new version here.

OpenERP LogoRecently at work, we’ve been setting up several new instances of OpenERP for customers. Our server operating system of choice is Ubuntu 10.04 LTS.

Installing OpenERP isn’t really that hard, but having seen several other “How Tos” on-line describing various methods where none seemed to do the whole thing in what I consider to be “the right way”, I thought I’d explain how we do it. There are a few forum posts that I’ve come across where the advice is just plain wrong too, so do be careful.

As we tend to host OpenERP on servers that are connected to the big wide Internet, our objective is to end up with a system that is:

      A: Accessible only via encrypted (SSL) services from the GTK client, Web browser, WebDAV and CalDAV
      B: Readily upgradeable and customisable

One of my friends said to me recently, “surely it’s just sudo apt-get install openerp-server isn’t it?” Fair enough; this would actually work. But there are several problems I have with using a packaged implementation in this instance:

  • Out-of-date. The latest packaged version I could see, in either the Ubuntu or Debian repositories, was 5.0.15. OpenERP is now at 6.0.3 and is a major upgrade from the 5.x series.
  • Lack of control. Being a business application, with many configuration choices, it can be harder to tweak your way when the packager determined that one particular way was the “true path”.
  • Upgrades and patches. Knowing how, where and why your OpenERP instance is installed the way it is, means you can decide when and how to update it and patch it, or add custom modifications.

So although the way I’m installing OpenERP below is manual, it gives us a much more fine-grained level of control. Without further ado then here is my way as it stands currently (“currently” because you can almost always improve things. HINT: suggestions for improvement gratefully accepted).

[Update 18/08/2011: I've updated this post for the new 6.0.3 release of OpenERP]

Step 1. Build your server

I install just the bare minimum from the install routine (you can install the openssh-server during the install procedure or install subsequently depending on your preference).

After the server has restarted for the first time I install the openssh-server package (so we can connect to it remotely) and denyhosts to add a degree of brute-force attack protection. There are other protection applications available: I’m not saying this one is the best, but it’s one that works and is easy to configure and manage. If you don’t already, it’s 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...]

sudo apt-get install openssh-server denyhosts

Now make sure you are running all the latest patches by doing an update:

sudo apt-get update
sudo apt-get dist-upgrade

Although not always essential it’s probably a good idea to reboot your server now and make sure it all comes back up and you can still login via ssh.

Now we’re ready to start the OpenERP install.

Step 2. Create the OpenERP user that will own and run the application

sudo adduser --system --home=/opt/openerp --group openerp

This is a “system” user. It is there to own and run the application, it isn’t supposed to be a person type user with a login etc. In Ubuntu, a system user gets a UID below 1000, has no shell (well it’s actually /bin/false) and has logins disabled. Note that I’ve specified a “home” of /opt/openerp, this is where the OpenERP server, and optional web client, 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.

Step 3. Install and configure the database server, PostgreSQL

sudo apt-get install postgresql

Then configure the OpenERP user on postgres:

First change to the postgres user so we have the necessary privileges to configure the database.

sudo su - postgres

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:

createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
Enter password for new role: ********
Enter it again: ********

[Update 18/08/2011: I have added the --no-superuser switch. There is no need for the openerp database user to have superuser privileges.]

Finally exit from the postgres user account:

exit

Step 4. Install the necessary Python libraries for the server

sudo apt-get install python python-psycopg2 python-reportlab \
python-egenix-mxdatetime python-tz python-pychart python-mako \
python-pydot python-lxml python-vobject python-yaml python-dateutil \
python-pychart python-webdav

And if you plan to use the Web client install the following:

sudo apt-get install python-cherrypy3 python-formencode python-pybabel \
python-simplejson python-pyparsing

Step 5. Install the OpenERP server, and optional web client, code

I tend to use wget for this sort of thing and I download the files to my home directory.

Make sure you get the latest version of the application files. At the time of writing this it’s 6.0.2 6.0.3; I got the download links from their download page.

wget http://www.openerp.com/download/stable/source/openerp-server-6.0.3.tar.gz

And if you want the web client:

wget http://www.openerp.com/download/stable/source/openerp-web-6.0.3.tar.gz

Now install the code where we need it: cd to the /opt/openerp/ directory and extract the tarball(s) there.

cd /opt/openerp
sudo tar xvf ~/openerp-server-6.0.3.tar.gz
sudo tar xvf ~/openerp-web-6.0.3.tar.gz

Next we need to change the ownership of all the the files to the openerp user and group.

sudo chown -R openerp: *

And finally, the way I have done this is to copy the server and web client directories to something with a simpler name so that the configuration files and boot scripts don’t need constant editing (I call them, rather unimaginatively, server and web). 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.

sudo cp -a openerp-server-6.0.3 server
sudo cp -a openerp-web-6.0.3 web

As an example, should OpenERP 6.0.4 come out next, I can extract the tarballs into /opt/openerp/ as above. I can do any testing I need, then repeat the copy command (replacing 6.0.3 obviously) 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 6.0.3 directories can be removed if wanted.

That’s the OpenERP server and web client software installed. The last steps to a working system are to set up the two (server and web client) configuration files and associated init scripts so it all starts and stops automatically when the server boots and shuts down.

Step 6. Configuring the OpenERP application

The default configuration file for the server (in /opt/openerp/server/doc/) could really do with laying out a little better and a few more comments in my opinion. I’ve started to tidy up this config file a bit and here is a link to the one I’m using at the moment (with the obvious bits changed). You need to copy or paste the contents of this file into /etc/ and call the file openerp-server.conf. Then you should secure it by changing ownership and access as follows:

sudo chown openerp:root /etc/openerp-server.conf
sudo chmod 640 /etc/openerp-server.conf

The above commands make the file owned and writeable only by the openerp user 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 db_password = ******** to have the same password you used way back in step 3. Use your favourite text editor here. I tend to use nano, e.g. sudo nano /etc/openerp-server.conf

Once the config file is edited, you can start the server if you like just to check if it actually runs.

/opt/openerp/server/bin/openerp-server.py --config=/etc/openerp-server.conf

It won’t really work just yet as it isn’t running as the openerp user. It’s running as your normal user so it won’t be able to talk to the PostgreSQL database. Just type CTL+C to stop the server.

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. Here’s a link to the one I’m using currently.

Similar to the config file, you need to either copy it or paste the contents of this script to a file in /etc/init.d/ and call it openerp-server. Once it is in the right place you will need to make it executable and owned by root:

sudo chmod 755 /etc/init.d/openerp-server
sudo chown root: /etc/init.d/openerp-server

In the config file there’s an entry for the server’s 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:

sudo mkdir /var/log/openerp
sudo chown openerp:root /var/log/openerp

Step 8. Testing the server

To start the OpenERP server type:

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

You should now be able to view the logfile and see that the server has started.

less /var/log/openerp/openerp-server.log

If there are any problems starting the server now you need to go back and check. There’s really no point ploughing on if the server doesn’t start…

OpenERP - First Login

OpenERP - First Login

If you now start up the GTK client and point it at your new server you should see a message like this:

Which is a good thing. It means the server is accepting connections and you do not have a database configured yet. I will leave configuring and setting up OpenERP as an exercise for the reader. This is a how to for installing the server. Not a how to on using and configuring OpenERP itself…

What I do recommend you do at this point is to change the super admin password to something nice and strong. By default it is “admin” and with that a user can create, backup, restore and drop databases (in the GTK client, go to the file menu and choose the Databases -> Administrator Password option to change it). This password is written as plain text into the /etc/openerp-server.conf file. Hence why we restricted access to just openerp and root.

One rather strange thing I’ve just realised is that when you change the super admin password and save it, OpenERP completely re-writes the config file. It removes all comments and scatters the configuration entries randomly throughout the file. I’m not sure as of now if this is by design or not.

Now it’s time to make sure the server stops properly too:

sudo /etc/init.d/openerp-server stop

Check the logfile again to make sure it has stopped and/or look at your server’s 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:

sudo update-rc.d openerp-server defaults

You can now try rebooting you server if you like. OpenERP should be running by the time you log back in.

If you type ps aux | grep openerp you should see a line similar to this:

openerp 708 3.8 5.8 181716 29668 ? Sl 21:05 0:00 python /opt/openerp/server/bin/openerp-server.py -c /etc/openerp-server.conf

Which shows that the server is running. And of course you can check the logfile or use the GTK client too.

Step 10. Configure and automate the Web Client

Although it’s called the web client, it’s really another server-type application which [ahem] serves OpenERP to users via a web browser instead of the GTK desktop client.

If you want to use the web client too, it’s basically just a repeat of steps 6, 7, 8 and 9.

The default configuration file for the web client (can also be found in /opt/openerp/web/doc/openerp-web.cfg) is laid out more nicely than the server one and should work as is when both the server and web client are installed on the same machine as we are doing here. I have changed one line to turn on error logging and point the file at our /var/log/openerp/ directory. For our installation, the file should reside in /etc/, be called openerp-web.conf and have it’s owner and access rights set as with the server configuration file:

sudo chown openerp:root /etc/openerp-web.conf
sudo chmod 640 /etc/openerp-web.conf

Here is a web client boot script. This needs to go into /etc/init.d/, be called openerp-web and be owned by root and executable.

sudo chmod 755 /etc/init.d/openerp-web
sudo chown root: /etc/init.d/openerp-web

You should now be able to start the web server by entering the following command:

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

Check the web client is running by looking in the log file, looking at the process log and, of course, connecting to your OpenERP server with a web browser. The web client by default runs on port 8080 so the URL to use is something like this: http://my-ip-or-domain:8080

Make sure the web client stops properly:

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

And then configure it to start and stop automatically.

sudo update-rc.d openerp-web defaults

You should now be able to reboot your server and have the OpenERP server and web client start and stop automatically.

I think that will do for this post. It’s long enough as it is!

I’ll do a part 2 in a little while where I’ll cover using apache, ssl and mod_proxy to provide encrypted access to all services.

[UPDATE: Part 2 is here]

Tags: , , , , , , , , ,

183 Comments

  • Judy Wong says:

    Nice tutorial! You save my life :D

  • Franz says:

    I get stuch at step 6.. I am not an expert of Linux.. I am trying to copy the 2 files using winscp , but itlooks like that the permission of the default user I am using are not good enough to write the files in the right place. I was able only to copy them in my /home/franz , but not /etc. Can you help me to understand how to change my permissions? Thx

    • Alan Lord says:

      Hi Franz,

      Linux is quite secure by nature. Essentially “You” as a regular user can’t write files anywhere where you could harm the system as a whole. When downloading a file, start your application from your home directory. You can write files there. Then (as is described above) use the sudo prefix to give yourself temporary Super User privileges so you can move the files to where they need to go.

      I don’t really understand what winscp has to do with anything. You really need to be looged into the server (normally over ssh) and just copy and paste the commands above. For the configuration files you could simple copy them using the url and wget like this:

      wget http://www.theopensourcerer.com/wp-content/uploads/2011/04/openerp-server.conf

      and then edit then copy the files to the right place as my commands describe.

      Hope this helps and good luck!

  • Oliver says:

    Thank you, ….worked like charm :) followed step-by-step twice allready, once on a VPS and once on local eeepc. Sweet & simple. OpenErp rocks !

  • Edgar Prada says:

    Great tutorial, thank you from Costa Rica. In Step 4 python-pydot is mentioned twice.

  • Kevin says:

    Thanks for the great instruction, with this type of installation the server run more powerful and less buggy then when I installed through the software center or synaptic.

  • Happy new year 2012 Alan!,

    Thanks for a very clear instructions, please help me with instructions to install the GTK client, because not mention anything about it, (see step 8 instructions..)

  • Hassan says:

    I get permission denied when I do the following: /opt/openerp/server/bin/openerp-server.py –config=/etc/openerp-server.conf

    • Alan Lord says:

      Hi Hassan,

      Try running it with sudo in front, if that fails then it’s probably either the config file is not readable or the openerp-server.py file is not readable or executable. Check the file ownership and permissions.

  • Joe Febrian says:

    hai dude, thanks for nice tutorial i am newbie in openerp or webserver, okey live in problem, i get “error /etc/init.d/apache2 reload
    Syntax error on line 3 of /etc/apache2/sites-enabled/openerp-ssl:
    SSLCertificateFile: file ‘/etc/ssl/openerp/server.crt’ does not exist or is empty
    …fail!”
    i already follow the steps according to the ordered ssl but i got an error like that, I really hope this helped about. thanks

    • Alan Lord says:

      Hi Joe,

      From the error I would guess that server.crt does not exist or is empty.

      Also make sure the permissions are correct on the /etc/ssl/openerp directory and the files within…

      The instructions do work if followed precisely.

      Thanks and have fun.

  • Fernando Laudares Camargos says:

    Worked like a charm and I was even able to install it in Portuguese without the need for additional localization packages. Thanks for the tutorial!

  • Tim says:

    Thank you for your hard and very detailed work! I am new to linux and was able to follow along and get the application running on our TK Linux LAPP server. One question, how to connect using a browser? The web server is running on the Server, but using URL 192.168.0.10:8080 does not work. The URL does work with the openERP client (set at 8071).

    Suggestions are be appreciated!

    Thank you
    Tim

    • Alan Lord says:

      Thanks Tim,

      If you’ve followed the instructions and installed the web client as well it should be working. Check that:

      1. The configuration files are correct,
      2. That the web client is actually running

  • SCN says:

    Hi Alan

    Thank you so much for this great howto. It is much more clear than what I have come across for openerp installation.

    Will these instructions work as is for installing openerp on Debian 6.0?

    Thank you in advance for the help!
    SCN

    • Alan Lord says:

      @SCN,

      Thanks.

      They might need a little tweaking here and there but as Ubuntu is based on debian then they should be quite similar.

      Here is an earlier comment about changing some lines of the openerp-server init script to suit debian systems…

      Do let us know how you get on, or better still take this how to, edit it and re-publish for debian systems. It’s CC licensed so re-use and improvement are positively encouraged :-)

      • SCN says:

        Thanks Alan

        I installed on Linux Mint 12 for testing and learning more about openerp and it worked just great.

        I will try on Debian and post results here when I am done. But that might take some time as i will have to back up my current CRM System (vTiger)… Upgrade OS to Debian 6.0 from the current Debian 5.0.8.

        SCN

  • Gerry says:

    Great article which helped me set up OpenERP – I’m now trying to install the mobile OpenERP server. Has anyone tried this? Any help would be appreciated

  • Neville says:

    Hi Alan,

    It seems my server is not starting up.
    On Step 8, I started the server but the log file is blank. Does openerp-server.log have to be created as well in /var/log/openerp/ similarly or it will be created when the server starts? see below output.

    sudo /etc/init.d/openerp-server start
    Starting openerp-server: openerp-server.

    less /var/log/openerp/openerp-server.log show blank file.

    thanks a lot.

    Neville

    • Alan Lord says:

      If you have followed steps 1 – 7 exactly the server will start and write to the log file. Make sure you check permissions and ownership of the relevant files and directories.

      Without any further information it is not possible to diagnose what is wrong. You need to find out *why* it isn’t starting, there must be an error somewhere. Try starting the server directly from the command line. Something like:

      Change to the openerp user:
      sudo su - openerp -s /bin/bash
      Now try running the server:
      /opt/openerp/server/bin/openerp-server.py -c /etc/openerp-server.conf

      You should get some messages and the server will either be running or it will have failed.

      Have fun

      • Neville says:

        Hi Alan,

        Yes that way its working fine and I get messages like:
        [2012-01-16 09:42:00,429][?] INFO:server:OpenERP server is running, waiting for connections…

        Just on step 8, after starting the server I get a message at the prompt “Starting openerp-server: openerp-server.”, but the log file still showing nothing. Checked the permissions and the log file owned by root. What permissions should be set for the log file specifically?

        Thanks

        • Alan Lord says:

          The log file should be created automatically by the openerp-server daemon and on one of our systems it looks like this:

          -rw-r–r– 1 openerp openerp 4156 2012-01-16 08:12 openerp-server.log

          And the directory (in /var/log) looks like this:

          drwxr-xr-x 2 openerp root 4096 2012-01-15 15:05 openerp

          If the log file is owned by root (as you mentioned) then the openerp user won’t be able to write to the file. Just delete the log file, check the /var/log/openerp directory is correctly configured as above then restart openerp. The log file should be created, and thus owned, by the openerp user.

          Al

          • Neville says:

            Hi Alan,

            This is quite weird…
            I removed the log file and directory permission are as you explained above. Restarted the server.
            However,trying to view the log file, says it does not exist.
            less /var/log/openerp/openerp-server.log
            /var/log/openerp/openerp-server.log: No such file or directory.
            What could possibly prevent the log file from be created?

            Neville

          • Alan Lord says:

            @Neville,

            It’s almost certainly permissions or ownership. The instructions work if followed correctly.

            From what you have said so far, I’d guess that either the OpenERP server is running as the wrong user or the directory is not writeable by the user “openerp”. Also check that the paths the the config file in /etc are correct and that it is readable by the openerp user.

            Do you have a openerp-server.log file in /var/log? If so is it recent? If there is one in /var/log then I’d guess that on start-up your server daemon isn’t reading the config file for some reason and starting with it’s default settings.

  • Stella says:

    Hi Alan,

    I’m new for openerp and ubuntu.

    Thanks for great tutorial.
    I have run openerp-server on Ubuntu 11.10 without problem with your tutorial.

    There’s one problem that’s the boot script for openerp-web cannot running automatically and the log file keep blank.
    When I tried to run manual, it’s work and log file can be written.

    thanks a lot.
    Stella

    • Alan Lord says:

      Hi Stella,

      Thanks for the kind words.

      Assuming that the init script is fine on 11.10 (Not something I have tested) I would first check that the symlinks were made properly (with the “update-rc.d” command in step 10) and check that the script is owned by root and is executable.

      Other than that there isn’t much more information to go on. If it still fails take a look in /var/log/syslog to see if there are any errors on boot-up when it it trying to run the openerp-web script.

      Good luck.

  • Ibrahim says:

    Worked like a charm on ubuntu 10.04LTS, now heading to part 2 … Thanks :)

  • Edgar Prada says:

    Hi, Alan.

    Now that I have the server running, -Is it possible to upgrade this OpenERP 6.0.3 Server to 6.1 RC1? I have it in a VirtualBox machine, so I would like to duplicate it and try it out.

    Thanks.

    • Alan Lord says:

      @Edgar, thanks,

      6.1 is a little bit different. There is a .deb that will install everything (apparently) but I have not tried it yet. I have installed the source but am unsure if I am doing it the “right way” yet…

      Watch this space for future posts. I plan to do a similar post for 6.1 but it is not ready.

      Upgrading is something different to starting from fresh. The database has changes. It it is not automatic.

      • Edgar Prada says:

        You have no idea how useful your guide and quick anwers are for most of us. Please keep up the good work. We really appreciate it.

        • Alan Lord says:

          Thanks Edgar, I’m glad this is helpful.

          Open Source Software is our business. We do this for a living and being able to provide some advice to those who are happy or able to help themselves is one way we contribute back to the Open Source Community; as indeed are all the comments from everyone else. :-)

  • Aimo says:

    Hi, your tutorial is spot on and it has really helped me in setting up the OpenERP server for my business. All the other tutorials i came across were very confusing.
    The issue i have at the moment is how to stop the twitter feeds and the Support sign (“stop traffic sign”) on the web page.
    This is mainly for security reasons. I dont fancy the idea that there can be an easy access to vital data which is stored in the database/Server.
    Thanks,
    Aimo from Finland.

  • Randy says:

    Thanks for taking the time to create this post. I was able to install OpenERP 6.0.4 on an Amazon EC2 server with Ubuntu 11.10. I was getting very frustrated with the OpenERP install instructions and like you pointed out in your blog the other instructions on the web seemed to always miss a small piece.

    I haven’t touched Unix in about 15 years and I was never an administrator. Your explanations of the instructions help-ed to point out a lot of the “why” and I appreciate that.

    Now I’ve been looking at the release notes for OpenERP 6.1. it’s very enticing and I look forward to setting up a test system with the method you described.

  • Neville says:

    @Alan

    Started afresh and made sure permission are ok. It appears that one other thing I needed to do was to reboot the system before the log file could be created. That was also the case with the web client.
    It is now working :-) Will move on and give feedback…

    Thanks again.
    Neville

    • Alan Lord says:

      Rebooting Linux systems is something that you don’t often have to do (unlike some other Operating systems that seem to require it more often than a whale breathes). Normal practice is to restart the specific application or daemon rather than the whole system.

      From memory, I think the only time I reboot during this install was simply to check that that the boot scripts are working properly. Other than that it shouldn’t really be necessary at all; certainly not just so the OpenERP server can create a log file…

  • J. Christophe says:

    @Alan

    Hi Alan, first of all thanks for this sweet little tut… Very handy for n00bs like me…

    I followed the instructions for part 1 of your tutorial and openerp-server starts and stops with no issues. I’m getting a cherrypy.engine.autoreload.files.add(res) AttributeError: ‘function’ object has no attribute ‘files’ though when launching the openerp-web.py and openerp-web does not start. Any ideas?

    FYI I am attempting to do this on a Debian Lenny distribution with python 2.5.2-3 and python-cherrypy3 3.0.2-2. Any help is greatly appreciated.

    Many thanks in advance,
    Jean-Samuel

  • Matt says:

    Hi Alan,

    I’m a little new to this whole process of using Linux and Ubuntu and so far I have been able to follow your instructions. However, I’m stuck on Step 6 where you say, “You need to copy or paste the contents of this file into /etc/ and call the file openerp-server.conf. ” This might be a stupid question but where is the /etc/ folder/location? Do I just create that a new folder with that?

    Thanks for your help in advance!

  • Matt says:

    Ok so nevermind my previous question. I found where the /etc/ file is. However, I can’t save the changes I make to the config file.

    It says, “gedit could not back up the old copy of the file before saving the new one. You can ignore this warning and save the file anyway, but if an error occurs while saving, you could lose the old copy of the file. Save anyway?”

    Any suggestions?

    • Alan Lord says:

      You will not be able to write to /etc without using sudo to give you temporary super-user privileges, or if you are using a graphical editor like gedit, use gksudo.

      So start gedit from the command line in a terminal by typing gksudo gedit

  • sunarc says:

    I want to know that how I add and update my custom module on openerp server6.0.3 postgresql database on ubuntu 10.04. While I am using SSH.

    please give solution

  • Matt says:

    I’m at the part of configuring and automating the Web Client, and I’m stuck at trying to find where the log is to see if the openerp-web file is running. I tried going back to the previous steps but I could not find where and how I placed the openerp-server log file /var/log/openerp

    Any help at all is greatly appreciated.

    • Alan Lord says:

      See the line:

      log.error_file = "/var/log/openerp/openerp-web-error.log"

      In the openerp-web.conf file. There is a corresponding line in the openerp-server.conf file…

      logfile = /var/log/openerp/openerp-server.log

      How this helps.

  • Jamil Rahman says:

    Hi Alan:
    I am new with openERP, less than a month. But this is the first document I ever found in the net where the instructions are compiled in its completeness. I have installed OpenERP: 6.0.3 (with PostGreSQL: 9.1.1)on an OpenSuse 12.1 system. Even though your document based on Ubuntu but I got a lots of helpful hints from your document. While learning this wonderful business application solution, I have some basic questions which I posted on the OpenERP community forum, but no body replied back yet.

    Questions are:
    1. Is there any way I could change the default superuser ID “admin” to something else, e.g. openerpadmin or openerpsu etc. (I know this is hard coded)
    2. In the OpenERP login screen, why I don’t see the user field pre-populated with “openerp”, I already put db_user value as “openerp” in the openerp-server.conf file (this user already created in postgres)
    3. In the login screen, I see two buttons, “Databases” and “Login”, how can I Login to the OpenERP with userId other than “admin” (e.g. openerp, which already created in postgres)

    Thanks again for good work.

    Jamil.

    • Alan Lord says:

      Hi Jamil and thanks for your kind words about this tutorial.

      As to your other questions.

      1. I have no idea. That is a good question.
      2. The “openerp” user is the user that the opener server runs as and the user which is allowed to connect to the Postgres Database. This is not the same as the user(s) which will log into a particular OpenERP database.
      3. You have to create a new Database first.

      Take a look at the initial “getting started” docs here: http://doc.openerp.com/v6.0/book/1/index.html

      Hope this helps.

  • mac says:

    hi followed your howto for openerp 6.1 installI left the web client stages out as 6.1 has its own client.
    I have got 6.1 working with the package install but found it a little clumsy to work with so thoughti would give a manual install a try and your document has helped.

    however get a error when i do /opt/openerp/openerp-server –config=/etc/openerp-server.conf

    – ERROR:root: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.

    thansk

  • Zeina Cuhat-Naffah says:

    Dear Mr. Lord,

    Thank you for this wonderful tutorial, and for your obvious efforts to provide a detailed, integral, and easy to apply procedure.

    I have a question about the creation of new databases:
    You created the postgreSQL user “openerp” with –no-superuser.
    As the openerp database user has no superuser privileges, we cannot create a new database using the GTK client. How do we do to create a new database?

    Best regards,

    Zeina

    • Alan Lord says:

      The user we created, “openerp”, can create databases owned by itself and itself only.

      We use this setup all the time. There is NO need for the OpenERP database user to have superuser privileges… From the PostgreSQL Manual:

      The superuser can override all access restrictions within the database. Superuser status is dangerous and should be used only when really needed. You must yourself be a superuser to create a new superuser. If not specified, NOSUPERUSER is the default.

      This is one of the bad traits that is seemingly standard in other OpenERP installation examples.

  • arnie says:

    There is only one thing I want to say: Thank you!
    THIS How-To works! Word by word!

    /arnie

  • [...] my previous howto for 6.0 was a such roaring success I though I’d better do something for the new 6.1 too. I [...]

  • Ezequiel says:

    This tutorial is amazing.
    Great work.
    Thanks.
    Ezequiel from Argentina.

  • sunny says:

    Hi Alan,

    I have installed the openerp server and web client with the inputs given above. When I check the processes are running. However when I try to access through the web client or GTK – they are unable to connect to server & also there are no errors logged. How to debug this? GTK client says could not connect to the server (both on XML rpc and net rpc ports). Appreciate your help
    Thanks

    • Alan Lord says:

      You can enable some debugging in the logs, both at the client end and the server. See the help available from the startup commands, e.g. openerp-client-6.0.3/bin/openerp-client.py --help

  • Jamil Rahman says:

    Hi Alan:
    Is there any way to import data from an external file, like .csv to OpenERP. For instance, I would like to create a product list for my inventory management and like to import those product data from a .csv file through the openerp-web client. Note, I am using ONLY web client.

    Cheers.

    /jamil.

  • Arnaud says:

    Hi Alan,
    I’ ve got a virtualized Ubuntu 10.04 with a provider.
    I’ ve followed your instructions until step 8 but when I try to start, here is the message I have:
    Starting openerp-server: openerp-server.
    But in fact, it doesn’t start.
    Here’s the message when stopping:
    start-stop-daemon: warning: failed to kill 1723: No such process
    Thanks for your answer.

  • Zabu says:

    Thanks. I followed the tutorial for installing openerp 6.1 and it worked. however the module I wanted to develop (medical) needed an earlier version of openerp. So I resorted to v6.0.2. I have followed the steps here; but i dont seem to get the initial web login at step 8. Instead i get an error message in browser as “No handler found.”; Any help!!

  • Maurya says:

    Sir I am not able to go through step no. 8

    the command ‘sudo /etc/init.d/openerp-server start’ is giving the following error msg. ‘sudo: unable to execute /etc/init.d/openerp-server: no such file or directory’

    If I do it like this
    cd /etc/init.d
    openerp-server start
    its starting but not not loging to postgresql because it is running as a normal current user
    Its not writing to the /var/log/openerp/openerp-server.log file

    If I do it the following way
    sudo su – openerp -s /bin/bash
    /opt/openerp/server/bin/openerp-server.py –config=/etc/openerp-server.conf
    Everything is working fine and Its writing to the /var/log/openerp/openerp-server.log file

    I have tried it many times even after reinstalling ubuntu 10.04 lts but its the same problem everytime

    Please suggest

  • cborgolte says:

    This is a really well written, complete and fully working How-to.
    Many Thanks!
    Saved me a lot of time.

  • Kinetik says:

    Hello,
    such a great tutorial you have!
    but when I started to login, the next page showing me this:

    403 Forbidden

    Request Forbidden — You are not allowed to access this resource.

    Traceback (most recent call last):
    File “/usr/lib/pymodules/python2.6/cherrypy/_cprequest.py”, line 603, in respond
    self.hooks.run(‘before_handler’)
    File “/usr/lib/pymodules/python2.6/cherrypy/_cprequest.py”, line 98, in run
    hook()
    File “/usr/lib/pymodules/python2.6/cherrypy/_cprequest.py”, line 58, in __call__
    return self.callback(**self.kwargs)
    File “/opt/openerp/web/openobject/tools/_tools.py”, line 39, in csrf_check
    raise cherrypy.HTTPError(403, “Request Forbidden — You are not allowed to access this resource.”)
    HTTPError: (403, ‘Request Forbidden — You are not allowed to access this resource.’)

    Powered by CherryPy 3.1.2

    So, can you help me if something went wrong here…
    Any help would be appreciated

  • Zahir says:

    Awesome How to. Thanks heaps. Eased my headache in no time. Starting my own IT company soon (home based with 5 casual staff :)). OpenERP is my tool of preference.

  • Ralf says:

    Hi Alan, thank you for this tutorial, it has been a great help.

    One thing though, the startup scripts you provide could be a little more fool proof. I had the misfortune to habitually name my web client config file “.cfg” instead of “.conf”, which of course didn’t work with your script. Not realising my mistake, it took me some time to figure out the problem.

    Since you already check if the neccessary files are present, it shouldn’t be much of a hassle to add a message saying what is missing/wrong instead of just doing an “exit 0″.

    Anyway, thank you for your work. ;)

  • Andy says:

    thanks for your great tutorial. I can run openerp without problems but i cant backup my databse. I get the following message
    Your version of OpenERP is unsupported. Support & maintenance services are available here: OpenERP Entreprise.

    OpenERP WebClient Error

    Client Traceback (most recent call last):
    File “/opt/openerp/server/openerp/addons/web/common/http.py”, line 260, in dispatch
    r = method(controller, self, **self.params)
    TypeError: backup() got an unexpected keyword argument ”

    Thanks for your reply

    • Alan Lord says:

      Hi Andy,

      Unfortunately this error isn’t really anything to do with the installation guide I think. Try searching the OpenERP forums or the bug tracker on Launchpad for your issue.

  • Roc says:

    This is exactly what I was looking. Great article. Since openerp 7 is already published, are there any modification needed to pay attention to?

  • Dhiren Mehta says:

    Hi Allan,

    Thanks for you step-by-step openerp-v6.0.x installation procedure.

    I have converted all your steps into a single bash script, which installs server and web application within minutes.

    It would be nice if you can publish it as link at on your page.

    If acceptable, please let me know where to send you the script.

    Regards
    Dhiren

  • Ricardo Granados Tiznado says:

    I installed everything as it was described just could not get down openerp from the official website (openerp.com / downloads), lower the server with bzr and also lower the addons, I followed the other steps as shown and it worked but I see no way to I take the addons. I have just installed base. Any ideas? . – Greetings.

  • Unni says:

    I had a problem occurred while creating multiple instances of ubuntu 6.0.3. The following error message is shown
    2013-09-04 10:36:39,956][?] INFO:server:OpenERP version – 6.0.3
    [2013-09-04 10:36:39,956][?] INFO:server:addons_path – /opt/openerp/server/bin/addons
    [2013-09-04 10:36:39,956][?] INFO:server:database hostname – localhost
    [2013-09-04 10:36:39,956][?] INFO:server:database port – 5432
    [2013-09-04 10:36:39,956][?] INFO:server:database user – remo
    [2013-09-04 10:36:39,956][?] INFO:server:initialising distributed objects services
    [2013-09-04 10:36:40,055][?] ERROR:httpd:Error occured when starting the server daemon.
    Traceback (most recent call last):
    File “/opt/openerp/server/bin/service/http_server.py”, line 147, in __init__
    self.server = ThreadedHTTPServer((interface, port), handler, proto=self._RealProto)
    File “/opt/openerp/server/bin/service/http_server.py”, line 75, in __init__
    HTTPServer.__init__(self, addr, requestHandler)
    File “/usr/lib/python2.7/SocketServer.py”, line 408, in __init__
    self.server_bind()
    File “/usr/lib/python2.7/BaseHTTPServer.py”, line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
    File “/usr/lib/python2.7/SocketServer.py”, line 419, in server_bind
    self.socket.bind(self.server_address)
    File “/usr/lib/python2.7/socket.py”, line 224, in meth
    return getattr(self._sock,name)(*args)
    error: [Errno 98] Address already in use
    Traceback (most recent call last):
    File “/opt/openerp/server/bin/openerp-server.py”, line 112, in
    service.http_server.init_servers()
    File “/opt/openerp/server/bin/service/http_server.py”, line 232, in init_servers
    int(tools.config.get(‘xmlrpc_port’, 8069)))
    File “/opt/openerp/server/bin/service/http_server.py”, line 212, in __init__
    handler=MultiHandler2)
    File “/opt/openerp/server/bin/service/http_server.py”, line 147, in __init__
    self.server = ThreadedHTTPServer((interface, port), handler, proto=self._RealProto)
    File “/opt/openerp/server/bin/service/http_server.py”, line 75, in __init__
    HTTPServer.__init__(self, addr, requestHandler)
    File “/usr/lib/python2.7/SocketServer.py”, line 408, in __init__
    self.server_bind()
    File “/usr/lib/python2.7/BaseHTTPServer.py”, line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
    File “/usr/lib/python2.7/SocketServer.py”, line 419, in server_bind
    self.socket.bind(self.server_address)
    File “/usr/lib/python2.7/socket.py”, line 224, in meth
    return getattr(self._sock,name)(*args)
    socket.error: [Errno 98] Address already in use

    Please suggest a solution

    • Alan Lord says:

      There’s a big clue at the end of the error: “socket.error: [Errno 98] Address already in use”

      You need to use different port numbers for each instance.

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>