How to Install OpenERP Odoo 8 on Ubuntu Server 14.04 LTS

odoo_logo_rgb

Introduction

Welcome to the latest of our very popular OpenERP Odoo installation “How Tos”.

The new release of Odoo 8.0 is a major upgrade introducing a great many new features and a new name.

Odoo 8.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 Odoo. Ecommerce, CMS, Integrated BI…

Rather than me blathering on about what’s new, you can simply just go and read the release notes here.

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 (for Debian/Ubuntu type systems) or a. rpm (Redhat/CentOS) package of OpenERP and install that. 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).

This time, rather than using a source tarball as the basis for installation we are going to take the code straight from the Odoo 8.0 branch on Github. This should help when it comes to installing updates and bug fixes in the future by being able to issue a git pull command to update the code. Bear in mind before doing a pull request you should always have backups and you may need to update your Odoo database(s) as well.

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

UPDATE: Note that it seems denyhosts is no longer being maintained and is not in the main Ubuntu repository any more. I’m aware of a possibly suitable alternative called fail2ban but have not used it yet; do you own research. Thanks to Rami for the cluebat!

UPDATE2: Thanks to Paul for the pointer. I have added python-unicodecsv to the list of dependencies. Apparently this is required to correctly restore backups.

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 Odoo install.

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

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

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/odoo, 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 Odoo/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/odoo80, /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 Odoo server as the odoo system user from the command line if it has no shell. This can be done quite easily:

sudo su - odoo -s /bin/bash

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

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

Step 3. Install and configure the database server, PostgreSQL

sudo apt-get install postgresql

Then configure the Odoo 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 Odoo 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 odoo
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-cups python-dateutil python-decorator python-docutils python-feedparser \
python-gdata python-geoip python-gevent python-imaging python-jinja2 python-ldap python-libxslt1
python-lxml python-mako python-mock python-openid python-passlib python-psutil python-psycopg2
python-pybabel python-pychart python-pydot python-pyparsing python-pypdf python-reportlab python-requests \
python-simplejson python-tz python-unicodecsv python-unittest2 python-vatnumber python-vobject \
python-werkzeug python-xlwt python-yaml wkhtmltopdf

With that done, all the dependencies for installing Odoo 8.0 are now satisfied (note that there are some changes between this and the packages required for OpenERP 7.0).

UPDATE & NOTE: It has been pointed out to me that the Qweb templating engine in Odoo 8 is warning that the version of wkhtmltopdf is too old. It turns out that Ubuntu 14.04 packages version 0.9.9 of this library even though this is rather old. To update your Ubuntu server please follow the instructions on this page. Many thanks to Ruben Kannan for pointing this out :-).

UPDATE & NOTE II: Zak suggests an alternative method to get and install the most recent version of wkhtmltopdf in this comment below. Thanks Zak.

UPDATE & NOTE III: David suggested adding python-cups and python-geoip to the list of modules to install in this comment below. Thanks David.

Step 5. Install the Odoo server

Install Git.
sudo apt-get install git

Switch to the Odoo user:
sudo su - odoo -s /bin/bash

Grab a copy of the most current Odoo 8 branch (Note the “.” at the end of this command!):
git clone https://www.github.com/odoo/odoo --depth 1 --branch 8.0 --single-branch .
(This might take a little while depending on the speed of your Internet connection.)

Note: Thanks to Ian Beardslee for the cluebat. Have now added --depth 1 to the command so it only retrieves the latest version without all the history. The download is now quite a bit quicker.

Once it’s finished exit from the odoo user: exit.

Step 6. Configuring the OpenERP application

The default configuration file for the server (/opt/odoo/debian/openerp-server.conf) is actually very minimal and will, with only a small change work fine so we’ll copy that file to where we need it and change it’s ownership and permissions:

sudo cp /opt/odoo/debian/openerp-server.conf /etc/odoo-server.conf
sudo chown odoo: /etc/odoo-server.conf
sudo chmod 640 /etc/odoo-server.conf

The above commands make the file owned and writeable only by the odoo user and group and only readable by odoo and root.

To allow the odoo server to run initially, you should only need to change two lines 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. Then modify the line addons_path = /usr/lib/python2.7/dist-packages/openerp/addons so that it reads addons_path = /opt/odoo/addons instead.

One other line we might as well add to the configuration file now, is to tell Odoo where to write its log file. To complement my suggested location below add the following line to the odoo-server.conf file:

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

Use your favourite text editor here. I tend to use nano, e.g.

sudo nano /etc/odoo-server.conf

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

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

If you end up with a few lines eventually saying OpenERP (Yes. The log still says OpenERP and not Odoo) is running and waiting for connections then you are all set.

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/odoo/debian/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 Odoo version 8.

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 odoo-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/odoo-server
sudo chown root: /etc/init.d/odoo-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/odoo
sudo chown odoo:root /var/log/odoo

Step 8. Testing the server

To start the Odoo server type:

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

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

less /var/log/odoo/odoo-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…

Odoo 8 New Database

Odoo 8 New Database

If the log file looks OK, now point your web browser at the domain or IP address of your Odoo 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 Odoo 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/odoo-server.conf file; hence why we restricted access to just odoo and root. When you change and save the new password the /etc/odoo-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/odoo-server stop

Check the log file again to make sure it has stopped and/or look at your server’s process list.

Step 9. Automating Odoo 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 odoo-server defaults

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

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

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

Odoo 8 Opening Screen

Odoo 8 Opening 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 feel for the new User Interface in Odoo 8 and shows you how easy it is to set up a basic system.

Tags: , , ,

276 Comments

  • lello says:

    Hello thanks for the post, I did every step but when I open myip:8069 in the browser there’s something wrong, the login page works but there’s something odd with style and then after login I see this message “Could not get content for /base/static/src/css/module.css defined in bundle ‘web.assets_backend’. Any suggestion?

  • jo says:

    excellent tutorial !!
    How do I publish my odoo website onto my domain name?
    I looked everywhere but I found nothing.
    Thanks

  • David Tran says:

    python-cups and python-geoip should be added while some standard Odoo modules require them.

  • shariff says:

    Thanks -nice and very helpful article,
    I need to see db selection on login screen how
    also i restored my backup with new db name, but it doesnt show in db management
    how to solve above(s)

  • shariff says:

    nice tutorial
    i restored my data, but unable to log in to server with my old ids and passwords

    any help available, appreciated

    shariff

  • GenioSoft says:

    My installation went very fine following your instructions. I just noticed one issue:

    sudo /etc/init.d/odoo-server start
    works very fine

    but less /var/log/odoo/odoo-server.log says:
    /var/log/odoo/odoo-server.log: No such file or directory

    any suggestions?? I need to see the log because I develop modules for my clients.

    • GenioSoft says:

      I just forgot to add logfile = /var/log/odoo/odoo-server.log to /etc/odoo-server.conf

      This guide is excellent, thak you very much !!!

      • ajl7519 says:

        You can also use tail to look at the log.

        tail -f /var/log/odoo/odoo-server.log

      • sleek says:

        have the same prob and i made sure that i added: “logfile = /var/log/odoo/odoo-server.log”

        inside “/etc/odoo-server.conf” so my entire odoo-server.conf looks like:


        [options]
        ; This is the password that allows database operations:
        ; admin_passwd = admin
        db_host = False
        db_port = False
        db_user = odoo
        db_password = *****
        addons_path = /opt/odoo/addons
        logfile = /var/log/odoo-server.log

        but when i do the command “less /var/log/odoo/odoo-server.log” it says:
        /var/log/odoo/odoo-server.log: No such file or directory

        server is up and running though. no errors so far. just i can’t seem to view the logfile since it has not been created. any thoughts?

  • Dylan says:

    I had issues with the System V script (/etc/init.d/openerp-server) at start up in ESXi so I switched over to the new Upstart script. See my Gist here: https://gist.github.com/dukedylan/9aa711101ff18bb9f92c

  • Ricardo says:

    Hello,

    First, realy good tutorial. I have a question for you!

    I have a configuration with 3 instances of odoo in the same server, whith different folders,users, and a boot script for each instace odoo.

    exemple with 3 instances:

    odoo-server1
    odoo-server2
    odoo-server3

    when i try to run : #sudo update-rc.d odoo-server1 defaults

    The request is : insserv: script odoo-server2: service odoo-server already provided!
    insserv: script odoo-server3: service odoo-server already provided!

    And whe i try to run for server2: #sudo update-rc.d odoo-server2 defaults

    The request is : insserv: script odoo-server-gbsnettoyage: service odoo-server already provided!
    insserv: exiting now!
    update-rc.d: error: insserv rejected the script header

    Doesn’t work here! Why?

    When i restart the server, just the server1 work. The server2 and server3 i need to restart manualy.

    Can you help for this problem?

    Thanks a lot.

  • Felipe says:

    Congratulations for the nice tutorial.
    Here is up and running.
    What is the proceedings for the update, does the menu in settings really works?
    Thanks.

  • Zied says:

    Hello

    First congratulation for the nice tutorial. I really appreciated because it is simple and clear and the most important is that it was working from the beginning 🙂

    I have one request, i wanted to connect odoo to a different database server.
    So I changed the configuration of portgresql to listen to all hosts on local lan and i tested the connection using pgadmin installed on another client. The connection was succesful

    Then I changed the /etc/odoo-server.conf to define the connection to the new database server
    ; admin_passwd = admin
    db_host = 192.168.1.xxx
    db_port = 5432
    db_user = odoo
    db_password = MyPgPassword
    addons_path = /opt/odoo/addons
    logfile = /var/log/odoo/odoo-server.log
    Unhappily when I Start the server it is still trying to connect to postgresql on the local host 🙁

    2015-03-23 15:52:14,564 2291 INFO ? openerp: database hostname: localhost
    2015-03-23 15:52:14,567 2291 INFO ? openerp: database port: 5432
    2015-03-23 15:52:14,570 2291 INFO ? openerp: database user: odoo
    2015-03-23 15:52:17,185 2291 INFO ? openerp.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069

    I also tried to change the file /opt/odoo/debian/init to point to the correct config file
    CONFIG=/etc/odoo-server.conf

    No change 🙁

    Do you have any idea?

    Thanks

    • Hey, For a remote DB Host you need to do the following.
      1) On the postgresql server edit your /etc/postgresql/(version number)/main/pg_hba.conf file allowing your odoo server’s ip to connect to postgresql.

      2) Allow through your firewall

      3) Change /etc/odoo-server.conf to reflect the ip of your db server

  • Cris says:

    Hi all,
    nks very much for this tutorial. Iam a newbie on OpenERP, I’ve a problem after running OpenERP:

    /opt/odoo-server/openerp/models.py:1005: Warning: ‘with’ will become a reserved keyword in Python 2.6
    Traceback (most recent call last):
    File “/opt/odoo-server/openerp-server”, line 2, in
    import openerp
    File “/opt/odoo-server/openerp/__init__.py”, line 72, in
    import modules
    File “/opt/odoo-server/openerp/modules/__init__.py”, line 27, in
    from . import db, graph, loading, migration, module, registry
    File “/opt/odoo-server/openerp/modules/graph.py”, line 32, in
    import openerp.osv as osv
    File “/opt/odoo-server/openerp/osv/__init__.py”, line 22, in
    import osv
    File “/opt/odoo-server/openerp/osv/osv.py”, line 23, in
    from .orm import Model, TransientModel, AbstractModel
    File “/opt/odoo-server/openerp/osv/orm.py”, line 5, in
    from ..models import (
    File “/opt/odoo-server/openerp/models.py”, line 1005
    with open(config.get(‘import_partial’), ‘rb’) as partial_import_file:
    ^
    SyntaxError: invalid syntax

  • Joss says:

    Great article. thanks for sharing your work.

    Do you have something to config the development enviroment? is there a way to have DEVELOPMENT/TESTING/PRODUCTION servers?

    Thanks in advance

  • Ahmed Hammad says:

    Thank you, really helpful.

    I suggest automating the custom odoo-server script by something like:

    wget http://www.theopensourcerer.com/wp-content/uploads/2014/09/odoo-server
    sudo cp odoo-server /etc/init.d/

    This is because I initially used nano and copy/paste. The script copied garbled and I wasted some time figuring it out.

  • Krum says:

    Excellent instruction, saves a lot of time for installing prerequisites. Regarding the wkhtmltopdf package I’ve used the precompiled (debian weezy) version from the site but I had to install a few prerequisites also. After that the warning message disappeared.

  • Quang Ngoc says:

    Can you create a script to install on Ubuntu?
    Thank you!

  • Scott says:

    Nice tutorial. I get the following errors when creating the database from the web interface.

    Odoo Server Error
    Traceback (most recent call last):
    File “/opt/odoo/openerp/http.py”, line 530, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
    File “/opt/odoo/openerp/http.py”, line 567, in dispatch
    result = self._call_function(**self.params)
    File “/opt/odoo/openerp/http.py”, line 304, in _call_function
    return self.endpoint(*args, **kwargs)
    File “/opt/odoo/openerp/http.py”, line 796, in __call__
    return self.method(*args, **kw)
    File “/opt/odoo/openerp/http.py”, line 396, in response_wrap
    response = f(*args, **kw)
    File “/opt/odoo/addons/web/controllers/main.py”, line 695, in create
    params[‘create_admin_pwd’])
    File “/opt/odoo/openerp/http.py”, line 872, in proxy_method
    result = dispatch_rpc(self.service_name, method, args)
    File “/opt/odoo/openerp/http.py”, line 114, in dispatch_rpc
    result = dispatch(method, params)
    File “/opt/odoo/openerp/service/db.py”, line 73, in dispatch
    return fn(*params)
    File “/opt/odoo/openerp/service/db.py”, line 90, in exp_create_database
    _create_empty_database(db_name)
    File “/opt/odoo/openerp/service/db.py”, line 85, in _create_empty_database
    cr.execute(“””CREATE DATABASE “%s” ENCODING ‘unicode’ TEMPLATE “%s” “”” % (name, chosen_template))
    File “/opt/odoo/openerp/sql_db.py”, line 158, in wrapper
    return f(self, *args, **kwargs)
    File “/opt/odoo/openerp/sql_db.py”, line 234, 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.

  • Tung says:

    When I use th following instruction:
    odoo@UbuntuX64:~$ sudo su – postgres
    [sudo] password for odoo:

    Which password will be entered in this step?
    Indeed, we have just created the user ‘odoo’ without any password (in fact, it is a system user).

  • Congratulations for this tutorial.
    Only want to point out that the package you should use for wkhtmltopdf is version 0.12.1 and not the latest version 0.12.2.1. With this latest version i came accross some issues : headers/footers not rendering properly when generating pdf reports. I downgraded to version 0.12.1 and the issue was solved.

  • Diego says:

    Allan Lord,

    Many thanks for your post, it was really exciting to go through all the steps. I’m new to all this, so I had lots of fun 🙂
    I can run Odoo and actually see it on my other computers, but only if I start the odoo server from odoo@, through the command /opt/odoo/openerp-server. If I try to start odoo from @ it starts but with errors, the same thing happens when running sudo /etc/init.d/odoo-server start. I’ve been looking closely for any mistakes but haven’t found any, yet. Could you advise me on what to do next?

  • Gladiator says:

    when i am type this sudo /etc/init.d/odoo-server start in my terminal. no change …what i do ….now bt everything will be ok ….

    • lermarts says:

      Hi Gladiator, maybe your installation is done alredy, did you try to run the app using your web browser?

  • lermarts says:

    Hi, I need your help with babel.dates, Im installing Odoo over debian 8… Pls gide me.

    odoo@debian:~$ /opt/odoo/openerp-server
    Traceback (most recent call last):
    File “/opt/odoo/openerp-server”, line 2, in
    import openerp
    File “/opt/odoo/openerp/__init__.py”, line 76, in
    import modules
    File “/opt/odoo/openerp/modules/__init__.py”, line 27, in
    from . import db, graph, loading, migration, module, registry
    File “/opt/odoo/openerp/modules/graph.py”, line 32, in
    import openerp.osv as osv
    File “/opt/odoo/openerp/osv/__init__.py”, line 22, in
    import osv
    File “/opt/odoo/openerp/osv/osv.py”, line 23, in
    from .orm import Model, TransientModel, AbstractModel
    File “/opt/odoo/openerp/osv/orm.py”, line 5, in
    from ..models import (
    File “/opt/odoo/openerp/models.py”, line 54, in
    import babel.dates
    ImportError: No module named babel.dates

    • Phil says:

      Had the same problem. It just seems that this package wasn´t installed.
      You just have to install it with:

      sudo apt-get install python-pybabel

      That solved it for me, but i had several more packages froms step 4
      that for whatever reason haven´t been installed.

  • MadMax says:

    Could anybody help me with this issue:
    I want to have several bases for several clients. Should I have several instances of odoo (users\directories\daemons\init scripts and sql bases) or it’s possible to have one odoo-server instance and several bases? how could I bind different users to different bases , is it poosible by only using listdb=true?

  • Saf says:

    Great step by step tutorial.
    Please correct a typo you have: python-unicodesv

  • Sudhir says:

    Simpy Amazing Step by Step guide. Thank you so much for a very good and clear walkthrough. I loved the way you presented the information.

  • Mike H says:

    Seemed to be going well except when I tried to start odoo I get a –chuid and –exec errors on lines 93 and 95 not found errors.. WHat did I miss?

  • Mike H says:

    There is no pid file in the /var/run/ folder. The odoo-server is in the /etc/init.d/ folder… The install gave me no errors..

    Any ideas?

  • Mike H says:

    I can manually start the server and get the apps in my browser..

  • panchote says:

    Hi. I did everything in the tutorial but I’m geting the following error when a tried to start the server:

    “ImportError: No module named trackback2″

    Please I will appreciate very much help with this issue.

  • ahmad badawi says:

    Great tutorial, i’ve been using your help since openerp 6!
    concerning the new version of wkhtmltopdf, the link is broken as a new version is released.
    the wget should point to http://garr.dl.sourceforge.net/project/wkhtmltopdf/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb

    • ahmad badawi says:

      alsom to avoid problems, first install git, xfonts-utils, xfonts-base, xfonts-75dpi BEFORE installing wkhtmltox
      if u install wkhtmltox before git, you wont be able to install git thanks to dependencies concerning xfonts-utils which wont install properly.

      so you need to do:
      sudo apt-get purge wkhtmltox <– in case u already installed it then:
      sudo apt-get install git xfonts-utils xfonts-base xfonts-75dpi

      then carry on with wkhtmltox

  • venkateshwaran says:

    step : 6
    sudo cp /opt/odoo/debian/openerp-server.conf /etc/odoo-server.conf

    I run this code in my terminal this error occured.

    cp: cannot stat ‘/opt/odoo/debian/openerp-server.conf’: No such file or directory

  • Rafa says:

    Nice tutorial thanks,

    When trying to run : git clone https://www.github.com/odoo/odoo –depth 1 –branch 8.0 –single-branch .

    unknown option : single branch

    • Dom says:

      I had the same problem,
      I move all contents of my addons directory, and all contents of my web directory (see opt/odoo…) to opt/odoo/server
      and then i put then addon-path to opt/odoo/server

  • Pablo says:

    Hello, I’m getting an error and the root of it seems to be that the web module is not available.

    has anybody got a solution for this?

    Here’s a bit of the log.

    2015-06-26 00:43:46,347 11185 CRITICAL ? openerp.modules.module: Couldn’t load module web
    2015-06-26 00:43:46,347 11185 CRITICAL ? openerp.modules.module: No module named web
    2015-06-26 00:43:46,347 11185 ERROR ? openerp.service.server: Failed to load server-wide module `web`.

  • Spanish Junior says:

    wkhtmltopdf is version 0.9.9-4
    wkhtmltox is the 0.12… version


    user@pc ~ $ apt-cache show wkhtmltox
    Package: wkhtmltox
    Status: install ok installed
    Priority: extra
    Section: utils
    Installed-Size: 117498
    Maintainer: Ashish Kulkarni
    Architecture: amd64
    Version: 0.12.2.1
    Replaces: wkhtmltopdf
    Provides: wkhtmltopdf
    Depends: fontconfig, libfontconfig1, libfreetype6, libpng12-0, zlib1g, libjpeg-turbo8, libssl1.0.0, libx11-6, libxext6, libxrender1, xfonts-base, xfonts-75dpi, libstdc++6, libc6
    Conflicts: wkhtmltopdf
    Description: convert HTML to PDF and various image formats using QtWebkit
    Description-md5: a29bfcc28ac652b4cb88f20bf4550e4b
    License: LGPLv3
    Vendor: wkhtmltopdf.org
    Homepage: http://wkhtmltopdf.org

    user@pc ~ $ apt-cache show wkhtmltopdf
    Package: wkhtmltopdf
    Priority: extra
    Section: universe/utils
    Installed-Size: 272
    Maintainer: Ubuntu Developers
    Original-Maintainer: Emmanuel Bouthenot
    Architecture: amd64
    Version: 0.9.9-4
    Depends: libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libqt4-network (>= 4:4.5.3), libqtcore4 (>= 4:4.7.0~beta1), libqtgui4 (>= 4:4.5.3), libqtwebkit4 (>= 2.2~2011week36), libstdc++6 (>= 4.1.1)
    Suggests: xserver | xvfb
    Filename: pool/universe/w/wkhtmltopdf/wkhtmltopdf_0.9.9-4_amd64.deb
    Size: 102698
    MD5sum: f8bb8ae87338143779b142ba0ac2fbaf
    SHA1: 447dd95bef420348dd37b829b13072dbe29685e5
    SHA256: 6acc779512d2b6676caa51356826c7dca22ee42371a25e040179c2d935f70a87
    Description-es: Command line utility to convert html to pdf using WebKit
    wkhtmltopdf is a command line program which permits one to create a pdf
    from an url, a local html file or stdin. It produces a pdf like rendred
    with the WebKit engine.
    .
    Este programa requiere un servidor X11 para arrancar.
    Description-md5: 8edcd0f6a2d998b9739d71e4f87d5281
    Homepage: http://code.google.com/p/wkhtmltopdf/
    Bugs: https://bugs.launchpad.net/ubuntu/+filebug
    Origin: Ubuntu

  • Spanish Junior says:

    Ok… a better explanation:

    wkhtmltopdf remains on the 0.9.9-4
    wkhtmltox keep updated the last compilations. They are currently on the 0.12.2.1 version.

    I suggest to change the apt-get install line, adding this last package.

  • Spanish Junior says:

    Be aware also that the current version of postgresql is having problems.

    To avoid them, is necesary to install the last version (currently 9.4) from postgre repositories.

    http://www.postgresql.org/download/linux/ubuntu/
    Here, the procedure:

    Create the file /etc/apt/sources.list.d/pgdg.list, and add a line for the repository
    deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main
    Import the repository signing key, and update the package lists
    wget –quiet -O – https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
    sudo apt-key add –
    sudo apt-get update

    I hope this notes contribute to someone, helping to your installation.

    Thanks for this guide!! I’ve learn a lot.

  • Dom says:

    Hi,
    Thanks for your tutorial. I used it for many odoo server setup.
    Now, i have two versions of Openerp in the opt directory, i have openerp (for v7) and odoo (for v8). Openerp is now starting up with the server. But odoo not yet.
    I have cared many attention for the name openerp-server and odoo-server in the etc directory.
    I would like to know how to change the port, for openerp or odoo, i have to change one of them,

    Thanks

  • Christoph says:

    Hi

    you mention fail2ban in your text. it is very easy to protect odoo with fail2ban. I wrote a german article about that on https://www.ionas-server.com/blog/fail2ban-schutz-vor-brute-force-angriffen/. But here is the short version in english:

    1) install fail2ban on your linux server

    2) tell nginx or apache to log every page access. For example in nginx: “access_log /var/log/nginx/odoo-access.log;”

    3) create a filter for odoo to check for “authenticate”

    4) add the filter to the jail.conf of fail2ban and then activate.

    If you don’t understand the german blog entry. Please write me an email.

    One important hint: don’t forget to “ignore your own ip” in fail2ban. Otherwise you ban yourself very fast. 🙂

    Best regards

    Christoph

  • Sanat says:

    You make Odoo developers life easy… Thanks a ton.

  • julien says:

    hello, thanks for your excellent tutorial! I have some error messages when installing the necessary python libraries at step 4, can you please help me? I’m new to Linux and I’m trying to install Odoo 8 on a Ubuntu 15.04 Server (64 bits). Here are the error messages, thanks in advance!

    Package python-gdata is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    Package python-pybabel is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    Package python-pydot is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package ‘python-gdata’ has no installation candidate
    E: Package ‘python-pybabel’ has no installation candidate
    E: Impossible de trouver le paquet python-pychart
    E: Package ‘python-pydot’ has no installation candidate
    E: Impossible de trouver le paquet python-pypdf
    E: Impossible de trouver le paquet python-unicodecsv
    E: Impossible de trouver le paquet python-vatnumber
    E: Impossible de trouver le paquet python-vobject
    E: Impossible de trouver le paquet python-xlwt
    E: Impossible de trouver le paquet wkhtmltopdf

    • julien says:

      This was because I used Ubuntu 15.04, after switching back to Ubuntu 14.04 I was able to install the Python libraries correctly.

  • Carl says:

    thanks for the work, I’ve used the tutorials many times with success.

    I’ve setup Odoo 8 on ubuntu 14.04 and it runs perfect when manually started as the odoo user, but doesn’t run when started as the script.

    Anythoughts?

  • Cliff says:

    Thanks so very much, everything working great, except I am getting and extra 0 when using a barcode scanner in the POS. I have tried using the POS software to remove the first character it does not help. If I type the bardcode it’s fine. At a bit of a loss why this is occurring. Any advice would be appreciated.

  • Jeff says:

    Hello All,
    First off, thank you to the opensourcerer for the great page. I have a question?
    Is there anyway of logging configuration changes, for example changes in currencies or journals or any changes which may have caused some errors.
    Thank you for you help.
    Jeff

  • Rui Caridade says:

    There is a problem if you have accountservice installed on Ubuntu. By installing odoo and creating the new user like you say account-daemon keeps consuming more and more cpu and ram. I suspect it was fixed on version 0.6.38 but Ubuntu still ships 0.6.37 (http://cgit.freedesktop.org/accountsservice/tree/NEWS)

    • Alan Lord says:

      I’ve never heard of accountservice before. Thanks for the heads up. Presumably it is not installed by default?

      • Rui Caridade says:

        On servers no. It is used by LightDM and others to gather info on users. It should ignore system users (uid < 1000) but on my 15.04 install it seems it isn't making a good job at it.

  • Boris ASSOGBA says:

    Thanks for this tutorial. I followed all steps and I get some errors. I need your help to troubleshoot my installation in order to get the OpenERP functional. I can’t connect to the framewaork via my brower.

    Here is the errors
    root@ubuntu-server:/# less /var/log/odoo/odoo-server.log
    2015-07-29 18:19:45,708 2222 INFO ? openerp: OpenERP version 8.0
    2015-07-29 18:19:45,708 2222 INFO ? openerp: addons paths: [‘/opt/odoo/.local/share/Odoo/addons/8.0′, u’/opt/odoo/addons’, ‘/opt/odoo/odoo/openerp/addons’]
    2015-07-29 18:19:45,708 2222 INFO ? openerp: database hostname: localhost
    2015-07-29 18:19:45,708 2222 INFO ? openerp: database port: 5432
    2015-07-29 18:19:45,708 2222 INFO ? openerp: database user: odoo
    2015-07-29 18:19:45,709 2222 WARNING ? openerp.modules.module: module web: module not found
    2015-07-29 18:19:45,709 2222 CRITICAL ? openerp.modules.module: Couldn’t load module web
    2015-07-29 18:19:45,709 2222 CRITICAL ? openerp.modules.module: No module named web
    2015-07-29 18:19:45,709 2222 ERROR ? openerp.service.server: 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/odoo/odoo/openerp/service/server.py”, line 870, in load_server_wide_modules
    openerp.modules.module.load_openerp_module(m)
    File “/opt/odoo/odoo/openerp/modules/module.py”, line 315, in load_openerp_module
    __import__(‘openerp.addons.’ + module_name)
    File “/opt/odoo/odoo/openerp/modules/module.py”, line 79, in load_module
    f, path, descr = imp.find_module(module_part, ad_paths)
    ImportError: No module named web
    2015-07-29 18:19:45,718 2222 WARNING ? openerp.modules.module: module web_kanban: module not found
    2015-07-29 18:19:45,718 2222 CRITICAL ? openerp.modules.module: Couldn’t load module web_kanban
    2015-07-29 18:19:45,718 2222 CRITICAL ? openerp.modules.module: No module named web_kanban
    2015-07-29 18:19:45,718 2222 ERROR ? openerp.service.server: Failed to load server-wide module `web_kanban`.
    Traceback (most recent call last):
    File “/opt/odoo/odoo/openerp/service/server.py”, line 870, in load_server_wide_modules
    openerp.modules.module.load_openerp_module(m)
    File “/opt/odoo/odoo/openerp/modules/module.py”, line 315, in load_openerp_module
    __import__(‘openerp.addons.’ + module_name)
    File “/opt/odoo/odoo/openerp/modules/module.py”, line 79, in load_module
    f, path, descr = imp.find_module(module_part, ad_paths)
    ImportError: No module named web_kanban
    2015-07-29 18:19:45,719 2222 INFO ? openerp.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069
    2015-07-29 18:21:50,926 2222 INFO ? openerp.service.server: Initiating shutdown
    2015-07-29 18:21:50,927 2222 INFO ? openerp.service.server: Hit CTRL-C again or send a second signal to force the shutdown

    Thanks in advance

    • João says:

      Dude, repeat this steap: To allow the odoo server to run initially, you should only need to change two lines 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. Then modify the line addons_path = /usr/lib/python2.7/dist-packages/openerp/addons so that it reads addons_path = /opt/odoo/addons instead.

  • Kam says:

    Hi, there’s a problem for the boot script.

    I followed every steps extactly as writen, and the boot script just won’t work.

    But after I fixed the locale error by running LC_ALL="en_US.utf8" problem solved.

    I believed there must be some other people facing this issue.

    Hope this helps.

  • Abe says:

    Hi All,

    Thank for the this tutorial . I have a road block on the step where I need to crab a copy of the the most current Odoo 8 branch. Please take a look at the error message and let me know what is the cause. thank you again

    fatal: destination path ‘.’ already exists and is not an empty directory.

    • Erwin Tanjung says:

      Have you check

      ~$ $HOME
      -su: /opt/odoo: Is a directory << make sure in this directory
      ~$ sudo git clone https://www.github.com/odoo/odoo –depth 1 –branch 8.0 –single-branch .

      The response is :

      Cloning into '.'…
      remote: Counting objects: 16278, done.

  • Erwin Tanjung says:

    git clone https://www.github.com/odoo/odoo –depth 1 –branch 8.0 –single-branch .
    This command respose : permission denied

    so i added sudo in the first of this command. This is ok ?

    • Alan Lord says:

      No. You can’t have followed the instructions properly. Using sudo will simply install everything as root which is definitely _not_ what you want.

      You should have switched to the odoo user first.

      sudo su - odoo -s /bin/bash

  • Erwin Tanjung says:

    i got this error after run this command :

    ~$ sudo su – odoo -s /bin/bash
    ~$ /opt/odoo/openerp-server
    Traceback (most recent call last):
    File “/opt/odoo/openerp-server”, line 5, in
    openerp.cli.main()
    File “/opt/odoo/openerp/cli/__init__.py”, line 68, in main
    o.run(args)
    File “/opt/odoo/openerp/cli/server.py”, line 180, in run
    main(args)
    File “/opt/odoo/openerp/cli/server.py”, line 140, in main
    openerp.tools.config.parse_config(args)
    File “/opt/odoo/openerp/tools/config.py”, line 360, in parse_config
    openerp.modules.module.initialize_sys_path()
    File “/opt/odoo/openerp/modules/module.py”, line 96, in initialize_sys_path
    dd = tools.config.addons_data_dir
    File “/opt/odoo/openerp/tools/config.py”, line 685, in addons_data_dir
    os.makedirs(d, 0700)
    File “/usr/lib/python2.7/os.py”, line 150, in makedirs
    makedirs(head, mode)
    File “/usr/lib/python2.7/os.py”, line 150, in makedirs
    makedirs(head, mode)
    File “/usr/lib/python2.7/os.py”, line 150, in makedirs
    makedirs(head, mode)
    File “/usr/lib/python2.7/os.py”, line 150, in makedirs
    makedirs(head, mode)
    File “/usr/lib/python2.7/os.py”, line 157, in makedirs
    mkdir(name, mode)
    OSError: [Errno 13] Permission denied: ‘/opt/odoo/.local’

  • freedomoss says:

    Fantastic! Great help…

  • Roman says:

    What is the password for odoo user?

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=""> <s> <strike> <strong>