How to install OpenERP 7.0 on Ubuntu 12.04 LTS

OpenERP Logo

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 can’t 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 doesn’t 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 openssh-server during the install procedure or install subsequently depending on your needs).

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 your server has all the latest versions & 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 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 (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 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:

sudo su - openerp -s /bin/bash

This will su your current terminal login to the openerp user (the “-” between su and openerp is correct) and use the shell /bin/bash. When this command is run you will be in openerp’s home directory: /opt/openerp.

When you have done what you need you can leave the openerp user’s shell by typing exit.

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: ********

Finally exit from the postgres user account:

exit

Step 4. Install the necessary Python libraries for the server

sudo apt-get install python-dateutil python-docutils python-feedparser python-gdata \
python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid \
python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing \
python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject \
python-webdav python-werkzeug python-xlwt python-yaml python-zsi

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 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: at the time of writing this it’s 7.0. I got the download links from their download pages (note there are also deb, rpm and exe builds in this area too). There isn’t 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!

wget http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz

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

cd /opt/openerp
sudo tar xvf ~/openerp-7.0-latest.tar.gz

Next we need to change the ownership of all the the files to the OpenERP user and group we created earlier.

sudo chown -R openerp: *

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 don’t 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.

sudo cp -a openerp-7.0 server

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.

That’s 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 /opt/openerp/server/install/) is actually very minimal and will, with only one small change work fine so we’ll simply copy that file to where we need it and change it’s ownership and permissions:

sudo cp /opt/openerp/server/install/openerp-server.conf /etc/
sudo chown openerp: /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 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 db_password = False to the same password you used back in step 3. Use your favourite text editor here. I tend to use nano, e.g.

sudo nano /etc/openerp-server.conf

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 openerp-server.conf file:

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

Once the configuration file is edited and saved, you can start the server just to check if it actually runs.

sudo su - openerp -s /bin/bash
/opt/openerp/server/openerp-server

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:

2012-12-19 11:53:51,613 6586 WARNING ? openerp.addons.google_docs.google_docs: Please install latest gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list

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 user’s shell if you are still in it first):

sudo apt-get install python-pip
sudo pip install gdata --upgrade

Going back and repeating the commands to start the server resulted in no further warnings

sudo su - openerp -s /bin/bash
/opt/openerp/server/openerp-server

If there are errors, you’ll need to go back and find out where the problem is.

Otherwise simply enter CTL+C to stop the server and then exit to 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 /opt/openerp/server/install/openerp-server.init but this will need a few small modifications to work with the system installed the way I have described above. Here’s a link to the one I’ve 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 /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 configuration 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 you need to go back and check. There’s really no point ploughing on if the server doesn’t start…

OpenERP 7 Database Management Screen

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:

http://IP_or_domain.com:8069

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 /etc/openerp-server.conf file; hence why we restricted access to just openerp and root. When you change and save the new password the /etc/openerp-server.conf file will be re-written and will have a lot more options in it.

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 1491 0.1 10.6 207132 53596 ? Sl 22:23 0:02 python /opt/openerp/server/openerp-server -c /etc/openerp-server.conf

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

OpenERP 70 Main Setup Screen

OpenERP 70 Main Setup Screen

That’s 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: , , ,

450 Comments

  • revant says:

    How do I completely uninstall openerp and everything related?

    • Alan Lord says:

      Just work backwards through the howto removing the files and directories you created. Then use sudo apt-get purge {list of packages} to remove all the packages we installed and any related configuration data.

  • Adrian Rincon says:

    Hats off sir! Excellent tutorial!!

  • Mourad says:

    Great tutorial! Thanks!!

  • openerp admin says:

    You should think about updates before installing. The way you are installing, I think it is much better to install from repo, much easier to update and rollback, if update fails.

    • Blanca Mancilla says:

      Can you expand? What would you change, then for the download? Will your method do authomatic updates?
      Thanks
      bm

  • yann says:

    Hey !
    great tutorial
    I’m stuck with an Internal server error when I try to access to openerp via Firefox :

    {"message": "OpenERP Server Error", "code": 200, "data": {"debug": "Server Traceback (most recent call last):\n File \"/opt/erp/server/openerp/addons/web/session.py\", line 89, in send\n return openerp.netsvc.dispatch_rpc(service_name, method, args)\n File \"/opt/erp/server/openerp/netsvc.py\", line 292, in dispatch_rpc\n result = ExportService.getService(service_name).dispatch(method, params)\n File \"/opt/erp/server/openerp/service/web_services.py\", line 122, in dispatch\n return fn(*params)\n File \"/opt/erp/server/openerp/service/web_services.py\", line 359, in exp_list\n cr = db.cursor()\n File \"/opt/erp/server/openerp/sql_db.py\", line 484, in cursor\n return Cursor(self._pool, self.dbname, serialized=serialized)\n File \"/opt/erp/server/openerp/sql_db.py\", line 182, in __init__\n self._cnx = pool.borrow(dsn(dbname))\n File \"/opt/erp/server/openerp/sql_db.py\", line 377, in _locked\n return fun(self, *args, **kwargs)\n File \"/opt/erp/server/openerp/sql_db.py\", line 440, in borrow\n result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)\n File \"/usr/lib/python2.7/dist-packages/psycopg2/__init__.py\", line 179, in connect\n connection_factory=connection_factory, async=async)\nOperationalError: FATAL: Peer authentication failed for user \"openerp\"\n\n\nClient Traceback (most recent call last):\n File \"/opt/erp/server/openerp/addons/web/http.py\", line 285, in dispatch\n r = method(self, **self.params)\n File \"/opt/erp/server/openerp/addons/web/controllers/main.py\", line 570, in index\n db, redir = db_monodb_redirect(req)\n File \"/opt/erp/server/openerp/addons/web/controllers/main.py\", line 106, in db_monodb_redirect\n dbs = db_list(req, True)\n File \"/opt/erp/server/openerp/addons/web/controllers/main.py\", line 90, in db_list\n dbs = proxy.list(force)\n File \"/opt/erp/server/openerp/addons/web/session.py\", line 30, in proxy_method\n result = self.session.send(self.service_name, method, *args)\n File \"/opt/erp/server/openerp/addons/web/session.py\", line 103, in send\n raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)\nFault: \n", "fault_code": "FATAL: Peer authentication failed for user \"openerp\"\n", "type": "server_exception"}}

    I’ve checked a lot of config files…
    The thing is my first user in ubuntu is named “openerp”, and the system user I’ve made for this tutorial is called “erp” ,to avoid conflict with the first one.
    Any clue to fix this bad stuff I’ve made (except reinstall of course) ^^
    Thanks

    • yann says:

      Hi !
      I’ve fixed that after several server’s reboot and checking the username again in config files… not sure what have fixed this…

      • Benaham says:

        Hi, i have the same problem like Yann but i don’t understand what did you do to solve it

        Internal Server Error

        {“message”: “OpenERP Server Error”, “code”: 200, “data”: {“debug”: “Server Traceback (most recent call last):\n File \”/opt/openerp/server/openerp/addons/web/session.py\”, line 89, in send\n return openerp.netsvc.dispatch_rpc(service_name, method, args)\n File \”/opt/openerp/server/openerp/netsvc.py\”, line 292, in dispatch_rpc\n result = ExportService.getService(service_name).dispatch(method, params)\n File \”/opt/openerp/server/openerp/service/web_services.py\”, line 122, in dispatch\n return fn(*params)\n File \”/opt/openerp/server/openerp/service/web_services.py\”, line 359, in exp_list\n cr = db.cursor()\n File \”/opt/openerp/server/openerp/sql_db.py\”, line 484, in cursor\n return Cursor(self._pool, self.dbname, serialized=serialized)\n File \”/opt/openerp/server/openerp/sql_db.py\”, line 182, in __init__\n self._cnx = pool.borrow(dsn(dbname))\n File \”/opt/openerp/server/openerp/sql_db.py\”, line 377, in _locked\n return fun(self, *args, **kwargs)\n File \”/opt/openerp/server/openerp/sql_db.py\”, line 440, in borrow\n result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)\n File \”/usr/lib/python2.7/dist-packages/psycopg2/__init__.py\”, line 179, in connect\n connection_factory=connection_factory, async=async)\nOperationalError: FATAL: password authentication failed for user \”openerp\”\n\n\nClient Traceback (most recent call last):\n File \”/opt/openerp/server/openerp/addons/web/http.py\”, line 285, in dispatch\n r = method(self, **self.params)\n File \”/opt/openerp/server/openerp/addons/web/controllers/main.py\”, line 573, in index\n db, redir = db_monodb_redirect(req)\n File \”/opt/openerp/server/openerp/addons/web/controllers/main.py\”, line 98, in db_monodb_redirect\n return db_redirect(req, not config[‘list_db’])\n File \”/opt/openerp/server/openerp/addons/web/controllers/main.py\”, line 109, in db_redirect\n dbs = db_list(req, True)\n File \”/opt/openerp/server/openerp/addons/web/controllers/main.py\”, line 90, in db_list\n dbs = proxy.list(force)\n File \”/opt/openerp/server/openerp/addons/web/session.py\”, line 30, in proxy_method\n result = self.session.send(self.service_name, method, *args)\n File \”/opt/openerp/server/openerp/addons/web/session.py\”, line 103, in send\n raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)\nFault: \n”, “fault_code”: “FATAL: password authentication failed for user \”openerp\”\n”, “type”: “server_exception”}}

  • Nando says:

    Thanks a lot. Nice tutorial.

  • Paco says:

    Hi,

    I followed your guide step by step and I got these errors when I tried to start the server at step 6.

    2013-06-26 15:58:18,305 27061 INFO ? openerp: OpenERP version7.0-20130625-231025
    2013-06-26 15:58:18,305 27061 INFO ? openerp: addons paths: /opt/openerp/server/openerp/addons
    2013-06-26 15:58:18,305 27061 INFO ? openerp: database hostname: localhost
    2013-06-26 15:58:18,305 27061 INFO ? openerp: database port: 5432
    2013-06-26 15:58:18,305 27061 INFO ? openerp: database user: openerp
    2013-06-26 15:58:18,425 27061 CRITICAL ? openerp.modules.module: Couldn’t load module web
    2013-06-26 15:58:18,425 27061 CRITICAL ? openerp.modules.module: No module named wsgi
    2013-06-26 15:58:18,425 27061 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 60, 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 1, in
    import http
    File “/opt/openerp/server/openerp/addons/web/http.py”, line 32, in
    import werkzeug.wsgi
    ImportError: No module named wsgi
    2013-06-26 15:58:18,432 27061 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069
    2013-06-26 15:58:18,464 27061 INFO ? openerp: OpenERP server is running, waiting for connections…

    Could you help me with this? Thanks!

    • Paco says:

      I’ve solved my problem using the following commands:

      sudo apt-get install python-pip
      sudo apt-get remove python-werkzeug
      sudo pip install werkzeug

      I was using Ubuntu 10.

      Thank you anyway, your guide is excellent! Probably the most detailed I have seen on Internet. Congratulations!

  • Santiago says:

    Thanks for your guide!! – It is the more complete and direct that we could find…! Thanks again for sharing, as our small size company now uses OpenERP + AWS!

    Best regards from Ecuador!

  • Dave says:

    I had everything running perfectly, and was able to access via LAN and Web. But now I only get a blank white screen. The URL shows the ‘O’ OpenErp flavicon and the page starts to load (shows red loading at top, center of page) but nothing but a blank screen. No errors in the log and when I check if the OpenErp server is running, it is. Any ideas? I have found two forum entries dump the database and starting over worked, and one person mentioned replacing all web addons. And ideas? I am stumped! Thanks for any help!

  • Oliver Stanton says:

    We have this problem – can you help?

    openerp@cloudgrippa:~$ /opt/openerp/server/openerp-server
    2013-07-04 07:39:11,384 4800 INFO ? openerp: OpenERP version 7.0
    2013-07-04 07:39:11,385 4800 INFO ? openerp: addons paths: /opt/openerp/server/openerp/addons
    2013-07-04 07:39:11,385 4800 INFO ? openerp: database hostname: localhost
    2013-07-04 07:39:11,386 4800 INFO ? openerp: database port: 5432
    2013-07-04 07:39:11,386 4800 INFO ? openerp: database user: openerp
    2013-07-04 07:39:11,388 4800 WARNING ? openerp.modules.module: module web: module not found
    2013-07-04 07:39:11,388 4800 CRITICAL ? openerp.modules.module: Couldn’t load module web
    2013-07-04 07:39:11,388 4800 CRITICAL ? openerp.modules.module: unsupported operand type(s) for +: ‘bool’ and ‘str’
    2013-07-04 07:39:11,388 4800 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 403, in load_openerp_module
    zip_mod_path = mod_path + ‘.zip’
    TypeError: unsupported operand type(s) for +: ‘bool’ and ‘str’
    2013-07-04 07:39:11,470 4800 WARNING ? openerp.modules.module: module web_kanban: module not found
    2013-07-04 07:39:11,471 4800 CRITICAL ? openerp.modules.module: Couldn’t load module web_kanban
    2013-07-04 07:39:11,471 4800 CRITICAL ? openerp.modules.module: unsupported operand type(s) for +: ‘bool’ and ‘str’
    2013-07-04 07:39:11,472 4800 ERROR ? openerp.service: Failed to load server-wide module `web_kanban`.
    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 403, in load_openerp_module
    zip_mod_path = mod_path + ‘.zip’
    TypeError: unsupported operand type(s) for +: ‘bool’ and ‘str’
    2013-07-04 07:39:11,474 4800 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069
    2013-07-04 07:39:11,475 4800 INFO ? openerp: OpenERP server is running, waiting for connections…

    ^[
    ^]
    :q!
    ^[
    /modules/module.py”, line 403, in load_openerp_module
    zip_mod_path = mod_path + ‘.zip’
    TypeError: unsupported operand type(s) for +: ‘bool’ and ‘str’
    2013-07-04 07:39:11,474 4800 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069
    2013-07-04 07:39:11,475 4800 INFO ? openerp: OpenERP server is running, waiting for connections…

    /modules/module.py”, line 403, in load_openerp_module
    zip_mod_path = mod_path + ‘.zip’
    TypeError: unsupported operand type(s) for +: ‘bool’ and ‘str’
    2013-07-04 07:39:11,474 4800 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069
    2013-07-04 07:39:11,475 4800 INFO ? openerp: OpenERP server is running, waiting for connections…

    • Alan Lord says:

      Hi Oliver,

      Looks like either your config file isn’t configured right (no path to web addons) or it is not being loaded by the start up script.

      Try starting OpenERP from the command line, as the openerp user of course, and specify your config file with:server/openerp-server -c /etc/openerp70-server.conf

      • Ruben says:

        Alan,

        Please tell me how to replace the ip 0.0.0.0 with my IP. I’ve installed this on my VPS using your great tutorial. I am not able to access openerp on my IP. My log is below


        2013-11-06 14:14:13,708 6533 INFO ? openerp: OpenERP version 7.0-20131105-002511
        2013-11-06 14:14:13,708 6533 INFO ? openerp: addons paths: /opt/openerp/server/openerp/addons
        2013-11-06 14:14:13,708 6533 INFO ? openerp: database hostname: localhost
        2013-11-06 14:14:13,708 6533 INFO ? openerp: database port: 5432
        2013-11-06 14:14:13,708 6533 INFO ? openerp: database user: openerp
        2013-11-06 14:14:14,081 6533 INFO ? openerp.addons.google_docs.google_docs: GData lib version `%s GData-Python/2.0.18` detected
        2013-11-06 14:14:14,398 6533 INFO ? openerp: OpenERP server is running, waiting for connections...
        2013-11-06 14:14:14,406 6533 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069

  • Reddy says:

    Hello there Grate tutorial thanks for it.. But where can i get configuration file like if I want to change default port number like that can you please provide me those details

  • Nath says:

    Hi,

    I am having problems with your boot script. I get a syntax error.

    15: /etc/init.d/openerp-server: Syntax error: “(” unexpected

    Thanks

  • Hi, Alan
    can you help me to resolve this problem please?

    postgres@CS903:~$ createuser –createdb –username postgres –no-createrole –no-superuser –pwprompt openerp
    Enter password for new role:
    Enter it again:
    createuser: could not connect to database postgres: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?

    ubuntu 12.04 LTS 32bit on hosting server from colocationamerica

    Thanks

    • Vikas says:

      Hi Miguel,

      I am facing the same issue as you were/are. If you have found a solution to it, can you please let me know what it is? Would appreciate it very much!

      Thanks in advance.

      • Alan Lord says:

        That error sounds like postgres is not running. Miguel wasn’t clear if he was using a shared host or a dedicated one. If it’s a shared host then I doubt very much you will have super-user access to postgres at all… You need to google the error and find out how others solved it.

        On a clean Ubuntu installation these instructions work if followed accurately.

        • Alan, I’m using a dedicated server from hosting company, i did google so many times, but i’m unable to resolve it, i’m newbie on linux/ubuntu

          thanks

          • Alan Lord says:

            Did you install Ubuntu on the server, or was it pre-installed by your hosting company? Sometimes they change the layout of the system or the configuration of it. Perhaps postgres is running as a different user? Perhaps postgres isn’t running?

            According to the postgres manual that error means

            “the server was not started, or it was not started where createdb expected it. Again, check the installation instructions or consult the administrator.”

  • Agnaldo Junior says:

    how to OpenERP client to access it from other computers that are connected to the same network as me? thank you

  • Gerard says:

    Perfect and neat. Thanks for the help.

  • reddy says:

    Where can i Configure default port number and

    Hello there Grate tutorial thanks for it.. But where can i get configuration file like if I want to change default port number like that can you please provide me those details

  • reddy says:

    When we are going to install throw launchpad we got different path for etch folder like
    server/7.0 server
    addons/7.0 addons
    openerp-web/7.0 web

    it’s clear if we want to configure web client we got it in the web .
    But where we can find in our source code install like nightly it’s very different

  • Federico says:

    Hay alguien que me instale Openerp 7 en mi servidor? Estoy dispuesto a pagar. Gracias

    • DannyQuispe says:

      Hola Federico, de donde eres? y puedes contactarme en dannyquispe por gmail, saludos

    • Hola,
      Le puedo ofrecer varias soluciones, tanto desde mi empresa en el reino unido como desde España donde soy autónomo.

      Como solución global le puedo ofrecer un servicio de VPS con el OpenERP instalado, también puedo ofertarle la instalación vía remota, en el caso de coincidiera que está en Canarias la instalación podría ser en sus instalaciones.

      Por favor no dude en contactar conmigo.

      Atentamente

  • Shaheryar Malik says:

    Thanks for your tutorial, i have used it to install on a VPS offered by a service provider, i have used Putty client to connect and after doing it all i was successfully able to get to the page of “Creating new Database” on my web browser but when i have finally tried to create a data base i have got a following exception;

    ———————————————————————-

    OpenERP Server Error
    Client Traceback (most recent call last):
    File “/opt/openerp/server/openerp/addons/web/http.py”, line 204, in dispatch
    response[“result”] = method(self, **self.params)
    File “/opt/openerp/server/openerp/addons/web/controllers/main.py”, line 777, in create
    params[‘create_admin_pwd’])
    File “/opt/openerp/server/openerp/addons/web/session.py”, line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
    File “/opt/openerp/server/openerp/addons/web/session.py”, line 97, in send
    raise xmlrpclib.Fault(‘AccessDenied’, openerp.tools.ustr(e))

    Server Access denied.
    ——————————————————————————-

    i am using updated the conf file as per ur tutorial by the password of step three and i have used this password as master password on the Creating Database page.

    I will highly appreciate if you can help me with it

    Regards

  • Alan Lord says:

    That is not the same password. OpenERP by default has a Super Admin password of “admin”

    admin_passwd = admin

    This is NOT the same password as the other line in the config file db_password = ... used to connect to the Postgres user you configured in step 3.

    • Shaheryar Malik says:

      Thanks alot for your response. i am trying to install it on VPS and due to less expertise on Linux shell i may have done some mistakes. i have now rebuild the OS again and now i am confused about STEP 7 which is as following;
      ——————————————-
      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 /opt/openerp/server/install/openerp-server.init but this will need a few small modifications to work with the system installed the way I have described above. Here’s a link to the one I’ve already modified for 7.0.
      ——————————–

      i have made a backup file of openerp-server.init file so that in case of problems i can restore it… then i have used the link mentioned to get the script and pasted it in the new openerp-server.init file by removing previous script of this file… but the instruction says “Modify”… now this thing is confusing for me that should i paste the script without removing the previous entries of the file or should i insert the changes only? .. Can i get a fully modified openerp-server.init file as per this tutorial?

      Looking forward for the help.. thanks

      • Alan Lord says:

        If you have followed all the previous steps correctly, just copy the file from the link provided and carry on following the instructions. You should only need to edit this script if you have deviated from the other instructions.

        • Shaheryar Malik says:

          Every step of this tutorial is perfectly followed but it seems that there is some issue with my VPS. I can successfully open the OpenErp frm Browser now… but when i try to create the database i get the following error;

          ———————————————————

          Client Traceback (most recent call last):
          File “/opt/openerp/server/openerp/addons/web/http.py”, line 204, in dispatch
          response[“result”] = method(self, **self.params)
          File “/opt/openerp/server/openerp/addons/web/controllers/main.py”, line 777, in create
          params[‘create_admin_pwd’])
          File “/opt/openerp/server/openerp/addons/web/session.py”, line 30, in proxy_method
          result = self.session.send(self.service_name, method, *args)
          File “/opt/openerp/server/openerp/addons/web/session.py”, line 103, in send
          raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

          Server Traceback (most recent call last):
          File “/opt/openerp/server/openerp/addons/web/session.py”, line 89, in send
          return openerp.netsvc.dispatch_rpc(service_name, method, args)
          File “/opt/openerp/server/openerp/netsvc.py”, line 292, in dispatch_rpc
          result = ExportService.getService(service_name).dispatch(method, params)
          File “/opt/openerp/server/openerp/service/web_services.py”, line 122, in dispatch
          return fn(*params)
          File “/opt/openerp/server/openerp/service/web_services.py”, line 167, in exp_create_database
          self._create_empty_database(db_name)
          File “/opt/openerp/server/openerp/service/web_services.py”, line 136, in _create_empty_database
          cr.execute(“””CREATE DATABASE “%s” ENCODING ‘unicode’ TEMPLATE “%s” “”” % (name, chosen_template))
          File “/opt/openerp/server/openerp/sql_db.py”, line 161, in wrapper
          return f(self, *args, **kwargs)
          File “/opt/openerp/server/openerp/sql_db.py”, line 226, in execute
          res = self._obj.execute(query, params)
          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.

          ————————————————————–

          Please tell me if there is something i can do about it… Many thanks

          • Shaheryar Malik says:

            Ok i got a solution for it… first of all i am thankful for your concern it kept me going.
            i have executed the following commands to get it done

            ————————————————-
            ~$ psql -U postgres

            psql (9.0.3)
            Type “help” for help.

            postgres=# update pg_database set datallowconn = TRUE where datname = ‘template0’;

            UPDATE 1
            postgres=# \c template0
            You are now connected to database “template0”.

            template0=# update pg_database set datistemplate = FALSE where datname = ‘template1’;
            UPDATE 1

            template0=# drop database template1;
            DROP DATABASE

            template0=# create database template1 with template = template0 encoding = ‘UTF8’;
            CREATE DATABASE

            template0=# update pg_database set datistemplate = TRUE where datname = ‘template1’;
            UPDATE 1

            template0=# \c template1
            You are now connected to database “template1”.

            template1=# update pg_database set datallowconn = FALSE where datname = ‘template0’;
            UPDATE 1

            —————————————————–

            this procedure is mentioned on https://gist.github.com/ffmike/877447

            Best regards

  • Manie says:

    Thanks buddy you are the best and must admit great tutorial!!! regards from SA

  • PS says:

    Thank you very much for that amazing tuturial. I just installed it on a local machine (Mint 15), and it works like a charm. Excellent work, thank you very much for sharing.

  • Fouad says:

    can you help me to resolve this problem please?

    openerp@Fouad:~$ /opt/openerpv7/server/openerp-server
    Exception in thread Thread-1:
    Traceback (most recent call last):
    File “/usr/lib/python2.6/threading.py”, line 532, in __bootstrap_inner
    self.run()
    File “/usr/lib/python2.6/threading.py”, line 484, in run
    self.__target(*self.__args, **self.__kwargs)
    File “/opt/openerpv7/server/openerp/service/wsgi_server.py”, line 436, in serve
    httpd = werkzeug.serving.make_server(interface, port, application, threaded=True)
    File “/usr/lib/pymodules/python2.6/werkzeug/serving.py”, line 251, in make_server
    passthrough_errors)
    File “/usr/lib/pymodules/python2.6/werkzeug/serving.py”, line 207, in __init__
    HTTPServer.__init__(self, (host, int(port)), handler)
    File “/usr/lib/python2.6/SocketServer.py”, line 400, in __init__
    self.server_bind()
    File “/usr/lib/python2.6/BaseHTTPServer.py”, line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
    File “/usr/lib/python2.6/SocketServer.py”, line 411, in server_bind
    self.socket.bind(self.server_address)
    File “”, line 1, in bind
    error: [Errno 98] Adresse déjà utilisée

  • Alan Lord says:

    error: [Errno 98] Adresse déjà utilisée << Here's the cluebat. The port you have configured is already being used (usually because you have another instance of OpenERP running).

  • Dany says:

    Thank you, it’s work!!!

  • Dave says:

    This is a great tutorial which works perfectly. Thank you to the author. Keep up the good work.

  • meemo yahya says:

    hats off to you sir… followed your instructions step by step, and it works just fine. A few glitch happened when I tried to use the bazaar (bzr) commands and got some error with some module web errors, and I swithed back to use wget.

    now just have figure out how to put in the addons and web directories. Or, I shouldn’t?? what is the addons and web directories are for??

  • Anonymous says:

    Hello,

    First of all thanks.
    Although I have a doubt:

    1) – This tutorial applies if I want to install the OpenERP in my server? Imagine I bought a domain (www.google.pt) (which has postgreSQL), how could I install it on that domain to become (www.demo.google.pt)?

    2) – Probably, I won’t have the console line in control panel of the domain..should I need to buy something specific?

  • Mangofunky says:

    Hi Alan
    Thanks for the great tutorial. Really helpful.
    I noticed since setting up Openerp with secure connection that the OpenErp Report designer doesn’t seem to accept any connections.
    I wonder if there was any settings that need to be changed in the opener-server.conf file in order to get it to work. Any hints really appreciated.

  • Juliano says:

    Alan, First of all great tutorial. I followed it on a dirty ubuntu install I had and it worked to perfection, now im trying to pass it on to a clean ubuntu install followed all the steps, and on the screen to create the OPEN ERP database I keep getting this:

    Client Traceback (most recent call last):
    File “/opt/openerp/server/openerp/addons/web/http.py”, line 204, in dispatch
    response[“result”] = method(self, **self.params)
    File “/opt/openerp/server/openerp/addons/web/controllers/main.py”, line 777, in create
    params[‘create_admin_pwd’])
    File “/opt/openerp/server/openerp/addons/web/session.py”, line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
    File “/opt/openerp/server/openerp/addons/web/session.py”, line 97, in send
    raise xmlrpclib.Fault(‘AccessDenied’, openerp.tools.ustr(e))

    Server Access denied.

    • Juliano says:

      Silly me,

      in the conf file, I forgot to remove the “;” to remove the comment since I wasn´t going to use default master password.

      This:
      ; admin_passwd = bellbank2013

      Should look like, This:
      admin_passwd = bellbank2013

  • Manoj Panikkar says:

    Hi Alan,

    This was a great post and tutorial. However, I would like to mention two things:

    1) You do not need to install the python packages one-by-one so laboriously. Try using the command sudo apt-get install python-vobject python-ldap [next package]

    2) In the step that you tell us to cp -a openerp-7.0 server, I receive an error. The filename is actually different than just openerp-7.0 (mine was openerp-7.0-20130906-231030) and you must include the FULL file name to copy it correctly. Otherwise it will not work. You can find the full file name by using the “dir” command.

    3) I got to the “http://IP_or_domain.com:8069” step. Do I need to install some sort of desktop environment (according to someone online, I should install gnome-core and x-window-system) so I can open a browser to access openERP?

    • Alan Lord says:

      @Manoj Thanks for the comments but I think you misread something:

      1) Just copy & paste the whole command in step 4 as is and it will install all the packages in one go.
      2) Of course if you will get a specific version you will need to reference the correct file. But the file “http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz” is always the latest build.
      3) Not really no. Connect to it from a different computer with a browser.

  • C Smith says:

    Hi
    Thanks for the excellent tutorial – thorough and accurate. Installed and all working!
    I need to make OpenERP use SSL (https)…..Any chance of extending tutorial to include this? (or point me at another guide?

    Thanks
    BB

  • C Smith says:

    If it wasn’t clear above – I need help to setup SSL/https on apache2.
    Thanks
    BB

  • vinay says:

    i am trying to connect openerp with postgresql installed on another system (changed had been done in required file postgresql.conf(accepting all connection), pg_hba.conf(ip is allowed) and openerp-server.conf(changed db_host))
    but am not able to connect to my postgres but am able to connect it with pgadminIII

    y@vinay-Veriton-Series:~$ sudo /etc/init.d/openerp-server restart
    Restarting openerp-server: start-stop-daemon: warning: failed to kill 6615: No such process
    openerp-server.

    y@vinay-Veriton-Series:~$ sh -x /etc/init.d/openerp-server restart
    + PATH=/bin:/sbin:/usr/bin
    + DAEMON=/opt/openerp/server/openerp-server
    + NAME=openerp-server
    + DESC=openerp-server
    + USER=openerp
    + CONFIGFILE=/etc/openerp-server.conf
    + PIDFILE=/var/run/openerp-server.pid
    + DAEMON_OPTS=-c /etc/openerp-server.conf
    + [ -x /opt/openerp/server/openerp-server ]
    + [ -f /etc/openerp-server.conf ]
    + echo -n Restarting openerp-server:
    Restarting openerp-server: + start-stop-daemon –stop –quiet –pidfile /var/run/openerp-server.pid –oknodo
    start-stop-daemon: warning: failed to kill 6645: No such process
    + sleep 1
    + start-stop-daemon –start –quiet –pidfile /var/run/openerp-server.pid –chuid openerp –background –make-pidfile –exec /opt/openerp/server/openerp-server — -c /etc/openerp-server.conf
    + echo openerp-server.
    openerp-server.
    + exit 0
    start-stop-daemon: unable to open pidfile ‘/var/run/openerp-server.pid’ for writing (Permission denied)

    please guide me for the same.,
    Thank you

  • […] Used some parts from this nice tutorial: http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/ […]

  • Vahe says:

    Hi there,
    thanks a lot to autor. perfect instruction.
    I have made several instalations on Ubuntu 12.04LTS and Debian GNU/Linux 7.1 (wheezy)
    systems it’s works fine and without any trouble.
    Anly think on debian upper than the version 6.0 instead of sudo update-rc.d openerp-server defaults in the step 9 shuld use insserv openerp-server.
    thank’s again to autor, wery useful instruction.

  • Aporie says:

    Really thanks for your tutorial ! It works perfectly !

  • Sharman says:

    I bow to you for making the openerp installation a breeze. I’ve stayed as far away from shell commands as possible & you’ve helped me overcome my fear. Step by step and line-by-line, you’ve covered everything.
    Keep up the great work!

  • Raya says:

    Thanks for your tuts! ;)IT WORKS!!!

  • audavbri says:

    Help with (copy) error in Step 5.
    Please excuse my (gross) ignorance as I am 100% new to Ubuntu, but I have got stuck on Step 5 at the following command “sudo cp -a openerp-7.0 server”.
    The error I am seeing is “cp: cannot stat ‘opener-7.0’: No such file or directory”.

    I gather this is a copy command to a directory that doesn’t exist yet. If I need to manually create this directory, I would appreciate instruction on how to do that too. Many thanks.

    I am running Ubuntu 12.04 via Parallels on a MacBook Pro

    • Alan Lord says:

      That command means “copy the directory, & all it’s contents, called openerp-7.0 to a directory called server”.

      It will create the new directory.

      Your error is actually missing a “p” in openerp-70 but it may be that the directory is called something different, perhaps with a build number. In Linux terminals you can use TAB to auto-complete commands so if you were to type “cp -a op+[TAB]” it should auto fill in the rest of that directory name in the /opt/openerp directory. You can then type “server” after it and the command should run to completion with no errors.

      • audavbri says:

        Many thanks Alan. I really appreciate your time.
        I took your advice and the TAB worked a treat (fyi it added “-latest” to the directory name). But I’m now wondering whether there are implications for the remainder of these procedures because I’ve moved on to Step 6, but the first command I attempt (sudo cp /opt/openerp/server/install/openerp-server.conf /etc/) returns the following error, “cp: cannot stat `/opt/openerp/server/install/openerp-server.conf’: No such file or directory”.
        Thanks again.

  • Logu says:

    Really thanks for your tutorial ! It works!

  • JoelChire says:

    Thanks So Much, your post help me a lot!

  • Henry says:

    Hi, I have follow your step to do the setting and already run it very smooth. Thank you so much.
    Now i have create a new module folder called “stock_extend”. If I want to add into the addons folder, how can I do so? Please advise. Thank you.

    • Henry says:

      because after I add into the addons folder then I restart the server, it suppose can see in the OpenERP Settings -> Installed Module there by take out the filter..but I can’t find it. Please advise

  • Amit says:

    client trace book!!

    http.py –> line 204
    main.py –>line 777
    session.py- > line 30

    are giving me issues!! please help me

  • Aman says:

    Thanks for the detailed instructions. Worked like a charm.
    Can you help me with another thing?
    When I create a user, a mail is sent to the user’s mail id
    containing the link to connect to OpenERP
    Ex:
    An invitation email containing the following subscription link has been sent:
    http://localhost:8069?db=openerp#action=login&token=N4syzkee6gwZd2laxHQN&type=reset

    Now my question is, how can I change localhost in the link to ip address of the machine on which OpenERP is hosted?

  • trappeur says:

    Perfect it’s work find!
    It will be amazing if you suggest a tutorial about integration open erp and eclipse to manage modules installed!
    Best Regards!

  • Ian says:

    Thanks heaps for the step by step guide.

    I’ve just set it up in a debian 64 bit VM (I’m good at breaking machines:-) )

    It’s a very accurate guide & worked well.

    cheers

  • Souhaib DOUASS says:

    Thank you very much ! i was a probleme in the independent library. now it’s work.

  • Patrick says:

    Hi guys I am reely newbee on computer programing but I wanted to get my own server and hosting at my house and I follow this nice guide here: http://www.howtoforge.com/perfect-server-debian-wheezy-apache2-bind-dovecot-ispconfig-3 so after I took a .deb package of openerp and installed it. After that, every tings was going fine, till I upgrade my pakages. I dont no what appening but after I try to go back on it, is was not working. I dont no what to do 🙁 if some one could help-me pleassssssse

    And sorry for the poor english. It’s my second language….:)

    so I got that:
    2013-11-05 23:14:46,164 13890 INFO ? openerp: OpenERP version 7.0-20131105-002511
    2013-11-05 23:14:46,164 13890 INFO ? openerp: addons paths: /usr/lib/pymodules/python2.7/openerp/addons
    2013-11-05 23:14:46,164 13890 INFO ? openerp: database hostname: localhost
    2013-11-05 23:14:46,164 13890 INFO ? openerp: database port: 5432
    2013-11-05 23:14:46,164 13890 INFO ? openerp: database user: administration
    2013-11-05 23:14:46,452 13890 INFO ? openerp.addons.google_docs.google_docs: GData lib version `%s GData-Python/2.0.17` detected
    2013-11-05 23:14:46,666 13890 INFO ? openerp: OpenERP server is running, waiting for connections…
    Exception in thread Thread-1:
    Traceback (most recent call last):
    File “/usr/lib/python2.7/threading.py”, line 552, in __bootstrap_inner
    self.run()
    File “/usr/lib/python2.7/threading.py”, line 505, in run
    self.__target(*self.__args, **self.__kwargs)
    File “/usr/lib/pymodules/python2.7/openerp/service/wsgi_server.py”, line 436, in serve
    httpd = werkzeug.serving.make_server(interface, port, application, threaded=True)
    File “/usr/lib/python2.7/dist-packages/werkzeug/serving.py”, line 402, in make_server
    passthrough_errors, ssl_context)
    File “/usr/lib/python2.7/dist-packages/werkzeug/serving.py”, line 334, in __init__
    HTTPServer.__init__(self, (host, int(port)), handler)
    File “/usr/lib/python2.7/SocketServer.py”, line 419, 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 430, 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] Adresse déjà utilisée

    • Alan Lord says:

      The clue is at the end of your error message “Adresse déjà utilisée”.

      This usually means another instance of OpenERP (or another program) is already running and has bound to the port.

      • Patrick says:

        Thanks for your answer Alan, but I d’ont even know how to correct my problem. Like I said, I am reely newbee and I d’ont even know were to start to correctify my problem. I found this tread on googling this particular problem ” [Errno 98] Adresse déjà utilisée ” So went I checked the answer on this tread, it was by you by the way (funny 😉 on august 9, you tell that was a port…..man I am reely poooooor 🙂

        If you can help me

        Thank You in advance

  • Jo says:

    Hello,

    Can you explain how to make OpenERP working in a subdomain? e.g. erp.example.com

    Thanks

Leave a Reply to reddy

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