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

  • Subash says:

    Hi Alan,
    Just want to know whether openerp 7 works with ubuntu 10.04..
    i tried to install but not working…

  • Subhash says:

    sudo: /etc/sudoers.d/README is mode 0777, should be 0440…..
    I got this error while installing and I got stuck..
    Please help me…………..

  • john says:

    Thanks for the info alan. my 2 instance running fine now.
    great article.
    Thanks.

  • Robin St.Clair says:

    Hi

    I wonder if you have any experience of installing OpenERP 7 over PostgreSQL 9.2.2?

    Before fumbling my way through this (I have a mostly Sybase 3 tier background), I thought I’d find out if there are any real gotchas.

    I would like to start with the most recent versions of everything as I have to create some interfaces down the track and I’d prefer to avoid any end of life situations.

    Any pointers you could give would be much appreciated.

    R+C

  • Bruce says:

    Hi. I’ve followed your posts for openerp installations since version 6.0; very helpful, thank you very much for taking the time.

    I noticed that you are using port 8070 to connect to the server but in the older versions 8069 was used. I’ve followed your steps for version 7 and this time was also using port 8069 that I was able to connect to the server not 8070. I this an error in the post?

    Thanks again

  • Carsten Laun-De Lellis says:

    Hi all

    First of all I want to say thankx for that great how-to.

    I tried to install openerp 7.0 on ubuntu 12.04 LTS.

    I am running in the following error message, whenever I try to create a database.

    DataError: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
    HINT: Use the same encoding as in the template database, or use template0 as template.

    Any hints?

    Thank you in advance.

    Carsten

  • Subhash says:

    Alan,
    Thanks a lot for the steps.
    I have successfully completed installing Openerp7 in ubuntu 12.04.

    But i am having a problem.Each time when i am updating the module the following script error is shown:

    https://apps.openerp.com/web/webclient/js?mods=web_diagram,process,web_graph,web_view_editor,web_calendar,base,web_kanban,base_setup,auth_oauth,mail,email_template,auth_signup,auth_oauth_signup,web_tests,knowledge,document,share,portal,portal_anonymous,loempia,web_gantt:0

    Why this message is shown…Could you please help me?

    Thanks & Regards

  • GK says:

    Hi Alan I have both openerp 6.0.3 and 7 installed in my computer. but when starting 6.0.3 web client a warning message is shown.
    “”Your OpenERP system is vulnerable to a major security issue, but you don’t have an OpenERP Enterprise contract. You should update to 6.0.3 as soon as possible.””
    What does it mean? The web client is actually running on 6.0.3. Please help.

  • Aasim Ahmed Ansari says:

    Hi,

    I installed OERP 7.0 and ran it as per your instructions. But when I click on Manage Database page, it takes me to blank screen. Can you help me out please?

  • Cristian says:

    Good notes Alan!
    You might add:

    sudo chown 644 /etc/init.d/openerp-server

    and possibly:
    sudo chown openerp:openerp /var/logs/openerp-server.log

    I still get:
    openerp.addons.google_docs.google_docs: Please install latest gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list

    when I run it straight from the directory it resides:
    ./openerp-server
    no biggie – great work
    Thanks
    Cristian

  • Jan NL says:

    Thanks for this very nice install guide.
    For me it was 20 years ago I tried to install Linux, so Linux is very new to me now, and you helped me out with this page to install OpenERP.

    I only struggled with the port number 8070 –> 8069 but I saw the solution in the logfile.

  • Bell says:

    Thank you very much, this is the holy bible of openerp 7 and you are the prophet!!!! can i translate to spanish and put in my blog ?
    Thanks again!!

    • Alan Lord says:

      @Bell,

      Thanks for the praise (although I think prophet is just a tad OTT 😉 )

      Anyway, yes of course you can translate and reproduce it. Our own blog posts and images are licensed under CC-BY-SA (http://creativecommons.org/licenses/by-sa/3.0/) which basically you means you can do what you like with it as long as:

      1. you provide proper attribution
      2. you issue your derived work under the same license terms

      Have fun and thanks for asking! 🙂

  • Mayuran says:

    First of all thank you for fantastic post on installing openerp.
    I was able to install and run the system successfully.
    But when i try to install any modules, it is throwing error message like this

    You try to install module ‘base_setup’ that depends on module ‘web_kanban’.
    But the latter module is not available in your system.

  • yari says:

    Good tutorial. Managed to get to step 6 and got same message about updating gdata. Followed your instructions

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

    And after that when I tried to restart opererp, got the same warning message about gdata-python-client. I manually downloaded the package and succesfully installed…same result, I’m still getting the warning message. Any clue on what could be wrong?

  • kdclaver says:

    Very good step by step installation. All things happen as you said but I get a report of little error after testing this command :
    sudo /etc/init.d/openerp-server stop
    I’ve taken the script on your website as you mentionned it and this command report an error like below:
    sudo /etc/init.d/openerp-server stop
    /etc/init.d/openerp-server: 14: /etc/init.d/openerp-server: INFO: not found
    /etc/init.d/openerp-server: 25: /etc/init.d/openerp-server: Syntax error: “(” unexpected
    root@openerp:/var/log/openerp#
    Without this small error I appreciate your effort to share this very beautiful howto.
    Thanks more !!!

    • Alan Lord says:

      @kdclaver

      You must have broken something when downloading the script. The script works fine from here and for many others.

      It should look like this: http://paste.ubuntu.com/1585446/

      • kdclaver says:

        Sorry to tell you that the script doesn’t work, I get another error like this :
        /etc/init.d/openerp-server start
        Starting openerp-server: start-stop-daemon: –start needs –exec or –startas
        Try ‘start-stop-daemon –help’ for more information.
        /etc/init.d/openerp-server: 47: /etc/init.d/openerp-server: –chuid: not found
        /etc/init.d/openerp-server: 48: /etc/init.d/openerp-server: –exec: not found
        openerp-server.
        root@openerp:~#
        I have done my script looks like the Ubuntu Pastebin link you give but when I try to make this command /etc/init.d/openerp-server start I get an error.
        Thanks more to help me solve this error.
        Without this error about the automatic start and stop the installation work fine and I’m happy to show that they have introduced OHADA/SYSCOA in this version.
        Regards

        • Alan Lord says:

          It does work!

          This howto is read by more than 500 new visitors per day and most seem to think it works fine.

          • kdclaver says:

            As you say I can confirm that it works for me too when I launch maunually /opt/openerp/server/openerp-server. But when I try to launch the script I get everytime the same error. I can copy and paste the script here to show you how it’s writing

            root@openerp:/etc/init.d# cat openerp-server
            #!/bin/sh

            ### BEGIN INIT INFO
            # Provides: openerp-server
            # Required-Start: $remote_fs $syslog
            # Required-Stop: $remote_fs $syslog
            # Should-Start: $network
            # Should-Stop: $network
            # Default-Start: 2 3 4 5
            # Default-Stop: 0 1 6
            # Short-Description: Enterprise Resource Management software
            # Description: Open ERP is a complete ERP and CRM software.
            ### END INIT INFO

            PATH=/bin:/sbin:/usr/bin
            DAEMON=/opt/openerp/server/openerp-server
            NAME=openerp-server
            DESC=openerp-server

            # Specify the user name (Default: openerp).
            USER=”openerp”

            # Specify an alternate config file (Default: /etc/openerp-server.conf).
            CONFIGFILE=”/etc/openerp-server.conf”

            # pidfile
            PIDFILE=/var/run/$NAME.pid

            # Additional options that are passed to the Daemon.
            DAEMON_OPTS=”-c $CONFIGFILE”

            [ -x $DAEMON ] || exit 0
            [ -f $CONFIGFILE ] || exit 0

            checkpid() {
            [ -f $PIDFILE ] || return 1
            pid=`cat $PIDFILE`
            [ -d /proc/$pid ] && return 0
            return 1
            }

            case “${1}” in
            start)
            echo -n “Starting ${DESC}: ”

            start-stop-daemon –start –quiet –pidfile ${PIDFILE} \
            –chuid ${USER} –background –make-pidfile \
            –exec ${DAEMON} — ${DAEMON_OPTS}
            echo “${NAME}.”
            ;;

            stop)
            echo -n “Stopping ${DESC}: ”
            start-stop-daemon –stop –quiet –pidfile ${PIDFILE} \
            –oknodo
            echo “${NAME}.”
            ;;

            restart|force-reload)
            echo -n “Restarting ${DESC}: ”
            start-stop-daemon –stop –quiet –pidfile ${PIDFILE} \
            –oknodo
            sleep 1
            start-stop-daemon –start –quiet –pidfile ${PIDFILE} \
            –chuid ${USER} –background –make-pidfile \
            –exec ${DAEMON} — ${DAEMON_OPTS}
            echo “${NAME}.”
            ;;
            *)

            N=/etc/init.d/${NAME}
            echo “Usage: ${NAME} {start|stop|restart|force-reload}” >&2
            exit 1
            ;;
            esac
            exit 0
            root@openerp:/etc/init.d#

          • kdclaver says:

            Dear all,
            I have found the error and solve it. I have just combine line 47 and 48 to have only one command line and now the script run without error : below the line I combine
            start)
            echo -n “Starting ${DESC}: ”

            start-stop-daemon –start –quiet –pidfile ${PIDFILE} –chuid ${USER} –background –make-pidfile –exec ${DAEMON} — ${DAEMON_OPTS}
            echo “${NAME}.”
            ;;

            Thanks more again and again and again for this great howto.

          • Alan Lord says:

            Well, I have no idea why you need to do that.

            “\” is the standard line continuation character – this should just work…

            What language is your Ubuntu system using? And also, did you try and edit the file with a Windows editor at all?

  • Subhash says:

    All my issues were solved.
    Alan u r great….
    🙂 🙂 🙂

  • Ryan says:

    thanks alot, great tutorial, thanks for taking the time to put this up !!

  • nico says:

    Thanks a lot for this tutorial, it helps me a lot for the school where i have install it (sorry for my english !)
    greetings !!

  • ildrugo says:

    Guys, there is an error in the custom init script
    it is
    # Specify the user name (Default: openerp).
    USER=openerp
    while it should be
    # Specify the user name (Default: openerp).
    USER=”openerp”

    Otherwise using non standard user name openerp won’t work

  • Dario says:

    Thanks for the tutorial!! 🙂
    In your installation the modules are in “/opt/openerp/server/openerp/addons”, but I don’t know where is the file with this rute to add new folder addons (or how do it)…
    And the changes in server/openerp/addons/ never appear on the module list (from new modules to change de “author” of an existing module), I updated de module list with the technical Features and cheked the permissions and the owner of the folder and files…

    • Dario says:

      Clic on installed modules, and then, in the search box, quit the “instaled” filter… then you can install the foraign modules (in the “Aplications” page, only are the modules online.

  • Jean-Bruno says:

    wow
    a perfect and practical job. The “Jerome added” don’t worked for me but i finally install it !
    Many thanks

  • Mahmood Akhalwaya says:

    Thanks for the sterling job done with this tutorial.
    Worked like a bomb.
    So simple that even a newbie like me with zero Linux experience got OpenERP up and running first time right

  • Luis Planes says:

    Very good. Thanks.

    But when running “sudo apt-get install postgresql” after step 2 “sudo su – openerp-s / bin / bash”, asks the key openerp user. There you go first with openerp user.

  • Kwasi says:

    Thanks Alan, the tutorial is a great one. one question, can the database from 6.1 be import directly into 7? or maybe upgrade the 6.1 server by copying the version 7 files into the folder. thnaks in advance.

    • Alan Lord says:

      @Kwasi

      No. Upgrading any ERP system is non-trivial. OpenERP s.a will migrate your database if you have an OpenERP Enterprise agreement, or you will need to do it manually and very carefully.

  • Edwin says:

    Hi Alan. I´ve few words to describe your post: Works like a charm! Really nice. I´ve used an old Lenovo PC with Ubuntu Server 12.10 without problems. Thank you very much.

  • Antoine says:

    Thank you, very good, simple, complete tutorial
    Works fine !

  • Marco says:

    Hi! I installed the way you said, and i got strange results. The server seems to be working fine, since i got the log file and everything is running smooth in it. However when i connect to the adequate port in the web browser i just see a white page. I don’t know what’s happening. To solve te problem i installed java 7, but it’s not working at all. However when i see the page in html, seems to make sense, the page is there, but i cannnot see it. Can you help me? . Im runnning OpenErp in a Debian squeeze.

    • Alan Lord says:

      @Marco,

      Sorry but I have no idea based on your description.

      Why on earth did you install Java? OpenERP has no dependencies on that as far as I am aware.

      Also, I have not tested this on, nor do I personally use Debian, so it is hard for me to suggest much other than to check the logs carefully and try turning up the reporting level to debug etc…

  • Saloc67 says:

    Hi. Thanks a lot for these instructions – for a newbie, they are really great.

    I believe I followed them to the letter, on Ubuntu 12.10.

    When I try create a database, I get this below. Any idea where the permissions have gone wrong?

    Thanks.

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

    Server Access denied.

    • Saloc67 says:

      Hmmm, I found that if I shutdown the server (it had started automatically after the reboot), and then manually switched to the openerp user and started openerp manually, everything works. Sounds like a problem with how the boot startup permissions?

  • PowrrrPlay says:

    Hello, these are great instructions. But I am having a problem with multiple instances on the same ubuntu system.

    I set up a demo system on ubuntu 12.04. I did not use the openerp naming standard as per the instructions. I changed everything to demo7 with seperate logs as per the multiple instances statement. Works fantastic.

    Thinking of multiple systems on the same ubuntu 12.04 system I then created a production system, prod7a. As above I changed everything in the install to do with openerp to prod7a, including the logs. Fantasic!

    Problem is, when I try to start the second instance, as it does not matter which one is started first, I get an error. “Internal Server Error”
    “The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application”

    • PowrrrPlay says:

      As for running multiple instances with your /ect/init.d/openerp-server start command, this is the issue for running more than one server.

      OSError: [Errno 13] Permission denied: ‘/tmp/oe-sessions-root/tmpalaF7O.__wz_sess’

      Two or more root instances trying to create this file.

  • PowrrrPlay says:

    Ubuntu 12.04, multi openerp running as demo and proda.

    The second system I start up gets this error number … OSError: [Errno 13] Permission denied: ‘/tmp/oe-sessions-root/tmpmAQro4.__wz_sess’. I have rebooted the system but still get this error on the second system started. It does not matter which system I start second.

    After a system reboot, the owner of oe-sessions-root is the first multi system started (either demo or proda) with 0700 permissions.

  • Youl says:

    Very Good How To !
    Everything work fine, i don’t know what i have miss… i connect on port 8069 not 8070, but isn’t a problem i will install ssl proxy from apache. The hard work is now to migrate data from 6.1

    Thank You Opensourcerer for your share.

  • JohnB says:

    works like a charm. Thank you!!! 🙂

  • Mahmood Akhalwaya says:

    Help me please.

    I have successfully installed OpenERP 6.11 and 7.0 as standalone on Ubuntu Server 12.04. I wanted to try my hand at having both running concurrently as I know 6.11 and would like to use it for reference when using 7.0. I am installing on my current Ubuntu server 12.04 with OpenERP 6.11 running perfectly. However I repeatedly get the following error whent creating the new datbase user in step 3 :
    createuser: could not connect to database postgres: FATAL authentication failed for user “postgres70”

    I have created OpenERP user: openerp70 in group openerp70(or should I have created this user in the group openerp).

    I entered the following to create the new database user:
    createuser –createdb –username postgres70 –no-createrole –no-superuser –pwprompt openerp70

    Is this correct? I must be using the 70 user suffix wrong.
    Also i have checked Postgres is running.

    • Mahmood Akhalwaya says:

      I forgot to mention that I used your 6.1 tutorial and already have one postgres user named postgres as per that tutorial.

      • Mahmood Akhalwaya says:

        My apologies the error message should read:
        createuser: could not connect to database postgres: FATAL Peer authentication failed for user “postgres70″

    • Alan Lord says:

      Creating a new user “openerp70” with group openerp70 is fine.

      When configuring the postgres user you have an error:
      –username should be postgres not postgres70 – the final username “openerp70” on that line is correct.

      You will probably need to clean up your postgres configuration – I am not sure what using postgres70 will do in that scenario.

      Once you have that done, you must create separate config files, init scripts and log directories/files etc. chown’ed to the appropriate users to run the two OpenERP systems independently of each other. They will need to be using different ports or the 2nd one to fire will fail.

      Have fun.

      • Mahmood Akhalwaya says:

        Thanks Alan I’ll retry later today. I wonder if it would do anything at all. I thought it might be because I was using a nonexistent user, thats why there was failure to authenticate. I wanted to try it with the postges user but wasn’t sure. Anways I’ll double check everything later today.

  • PowrrrPlay says:

    Hi Allen, Just a note to reiterate the problem I tried to describe when starting multiple instances of Openerp on ubuntu 12. If you start your instances as /ect/init.d/client1 start and /etc/init.d/client2 start there will be a conflict/error with /tmp. Reading Reading Reading.

    My thick skull. I am not sure where I found it but I just want to reiterate to avoid this ownership confilict when starting multiple instances on /tmp use the “service command”

    service client1 start
    service client2 start

    and everything is golden.

    Sorry for my confusing posts.

    Cheers.

    • Alan Lord says:

      @PowrrrPlay – using “service” or /etc/init.d/filename should not make any real difference from what I can tell.

      This issue is ownership of the files in /tmp and having previously, at some point, started one or other of the systems with the wrong user. This creates the structure in /tmp with the wrong permissions.

      Probably the easiest way to fix this? Stop all instances of OpenERP, delete *everything* openERP related from /tmp and then restart your OpenERP instances.

  • Thé Olux says:

    I followed your guidelines exactly, and I can tell you that it works flawlessly on Ubuntu 12.10 as well! Not even a single error during the installation process. The server uses port 8069 though (not 8070.)

    Thanks a lot! Using your installation procedure I could finally install OpenERP for the first time!

  • Francois says:

    Hi all,
    How it’s possible to install a module extra for the openerp7? I have unzip more addons on /opt/openerp/server/openerp/addons/ then i have change chmod -R 775 and chown -R openerp: but nothing addons when i update the module liste on addons not installed.

  • LookingForSSL says:

    Hey.
    In the first place i’d like to thank for this wonderful explained perfect working tutorial.
    I try to figure out how to establish a TLS/SSL connection between a normal browser and my OpenERP instance. Am i forced to use something like the openerp-web-client like in the Version 6 days? I cat find any informations concerning OpenERP7 and SSL so i’d be really glad, if you can give me some hints.
    Thanks in advance!

  • GUAU!! Excelent

    Just !NO USE THE JEROME WAY! If you do that take you have to be an expert in OpenERP in order to put the right Paths.

    If not, just follow the tutorial word by word.
    Thanks!

  • Mahmood Akhalwaya says:

    I have successfully installed OpenERP 7.0 on Ubuntu server 12.04 and am running it well with Chrome.
    However when trying to do an update from a web client on my LAN via the settings screen, I get the following error:

    Client Traceback (most recent call last):
    File “/home/odoo/source/web/addons/web/http.py”, line 190, in dispatch
    self.jsonrequest = simplejson.loads(request, object_hook=reject_nonliteral)
    File “/usr/lib/python2.7/dist-packages/simplejson/__init__.py”, line 468, in loads
    return cls(encoding=encoding, **kw).decode(s)
    File “/usr/lib/python2.7/dist-packages/simplejson/decoder.py”, line 406, in decode
    obj, end = self.raw_decode(s)
    File “/usr/lib/python2.7/dist-packages/simplejson/decoder.py”, line 426, in raw_decode
    raise JSONDecodeError(“No JSON object could be decoded”, s, idx)
    JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0

    I’ve double checked all the steps and confirmed that all steps were followed correctly.

    Can I do an update by downloading the latest build and extract it into my install directory? I know this is not the ideal situation, the above error should be resolved.
    Will this affect my

    • Mahmood Akhalwaya says:

      Please ignore last line above.

    • Mahmood Akhalwaya says:

      The above error is caused by inconsistent data in the demo database, ie if you load demonstration data when creating a new database.
      To solve just drop any databases containing demonstration data.

  • kdclaver says:

    Dear all,
    I want to install openerp on my dedicated server with public IP address how can I redirect http://my-address:8069 to https://my-address:8069 ????

    Thanks more for your feedback

  • smK says:

    Thank you so much, I had so many problems with windows version. With your tutorial I could install OpenERP on my dedicated server and it works properly !

  • Daniel says:

    Hi,

    I have problem installing openerp 7 on my synology nas, The server can run just as a service cant:

    Oxygen> openerp-server start
    Traceback (most recent call last):
    File “/usr/local/bin/openerp-server”, line 4, in
    import pkg_resources
    File “/usr/local/lib/python2.7/site-packages/pkg_resources.py”, line 2709, in
    working_set.require(__requires__)
    File “/usr/local/lib/python2.7/site-packages/pkg_resources.py”, line 686, in require
    needed = self.resolve(parse_requirements(requirements))
    File “/usr/local/lib/python2.7/site-packages/pkg_resources.py”, line 584, in resolve
    raise DistributionNotFound(req)
    pkg_resources.DistributionNotFound: psutil

    Other problem is how can i modifie the client (database manager) username & pass? cause i cant set privileges correctly to hide all other table in the pg »» i need that to able to set the client portal option..

    Thx

    • Mwithi says:

      Hi Daniel, did you solve this problem? I have the same… but before restarting the system the first time, start-stop-restart were working fine.

      thank you

  • christian says:

    I try it with ubuntu 12.10 but it’s not working
    Step5:when I run the “sudo cp -a openerp-7.0 server” the system can’t evaluate “openerp3 & it gave me the following error:”no file or folder of this type”

    • Alan Lord says:

      It is saying that it can’t find the directory in your command. You are either in the wrong directory to start with or it isn’t called openerp-7.0.

      • Dalejsa says:

        Hi Alan

        Thanks again for this tutorial. I followed it sometime back and had success. I need to upgrade now to remove some old bugs. I found these instructions on the OpenERP site, but can’t seem to apply it to the file structure that this installation created. What is the best way to do a full update based on your install instructions? (OpenERP content below, when used the error is that the folders don’t exist. I have browed all over for that web directory but cannot seem to find it:)

        TO UPDATE

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

        sudo su – openerp -s /bin/bash

        cd /opt/openerp/addons/

        bzr pull

        cd /opt/openerp/web/

        bzr pull

        cd /opt/openerp/server/

        bzr pull

  • Benoy says:

    Thatks for providing this wonderful support.

  • MYstIC G says:

    Thanks for writing this up, the OpenERP website has been extremely unhelpful in this regard for version 7.

  • lucas oketch says:

    where do i find mx module

  • Amir says:

    Thank you very much. I managed to get it up and running without much fuss.
    Good work sir.

  • zainudin says:

    Hi,can anyone help me with this error :
    2013-03-12 05:45:48,548 2205 INFO ? openerp: OpenERP version 7.0alpha-20130125-000101
    2013-03-12 05:45:48,550 2205 INFO ? openerp: addons paths: /opt/openerp/server/openerp/addons
    2013-03-12 05:45:48,551 2205 INFO ? openerp: database hostname: localhost
    2013-03-12 05:45:48,552 2205 INFO ? openerp: database port: 5432
    2013-03-12 05:45:48,553 2205 INFO ? openerp: database user: openerp
    2013-03-12 05:45:49,744 2205 CRITICAL ? openerp.modules.module: Couldn’t load module web
    2013-03-12 05:45:49,747 2205 CRITICAL ? openerp.modules.module: No module named unittest2
    2013-03-12 05:45:49,748 2205 ERROR ? openerp.service: Failed to load server-wide module `web`.
    The `web` module is provided by the addons found in the `openerp-web` project.
    Maybe you forgot to add those addons in your addons_path configuration.
    Traceback (most recent call last):
    File “/opt/openerp/server/openerp/service/__init__.py”, line 59, in load_server_wide_modules
    openerp.modules.module.load_openerp_module(m)
    File “/opt/openerp/server/openerp/modules/module.py”, line 405, in load_openerp_module
    __import__(‘openerp.addons.’ + module_name)
    File “/opt/openerp/server/openerp/modules/module.py”, line 133, in load_module
    mod = imp.load_module(‘openerp.addons.’ + module_part, f, path, descr)
    File “/opt/openerp/server/openerp/addons/web/__init__.py”, line 3, in
    import cli
    File “/opt/openerp/server/openerp/addons/web/cli/__init__.py”, line 1, in
    import test_js
    File “/opt/openerp/server/openerp/addons/web/cli/test_js.py”, line 5, in
    import unittest2
    ImportError: No module named unittest2
    2013-03-12 05:45:49,929 2205 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069
    2013-03-12 05:45:49,953 2205 INFO ? openerp: OpenERP server is running, waiting for connections…

  • dalejsa says:

    Geez I wanna buy you a beer so much right now. Thanks for this info

    The only thing for users to note is that the directory openerp-7.0 WILL DIFFER depending on the name of the nightly build you download. I ran vm (renamed) the directory openerp-7.0-(long date here) to the simple name openerp-7.0 and the rest of your instructions worked like a bomb

    Thanks again

    • Alan Lord says:

      Beer is great. If you want to you can send a few bucks to our PayPal account (paypal@libertus.co.uk) 🙂

      That’s good advice about the directory name. Thanks for pointing it out!

  • hassan says:

    how can I run the OpenERP server through eclipse IDE with openerp as the database user?

Leave a Reply to Alan Lord

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>