Redeem Now
Read More
Read now
Menu Close
    Start a Project Request quote Reading list Switch to dark mode
    hyperlocal-marketplace-guide

    Installation of OpenERP 7.0 on Ubuntu

    Step 1. Build your server

    install the openssh-server package (so we can connect to it remotely) and denyhosts to add a degree of brute-force attack protection

    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

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

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

    Now run command

    sudo su – openerp -s /bin/bash

    This will change your current terminal login to openerp user.

    Now 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

    First change to the postgres user by typing

    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

    Step 5. Install the OpenERP server

    Download the latest version of the application:

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

    Now install the code where we need it

    cd /opt/openerp

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

    (In place of ‘~’ write the path where you have downloaded openerp latest version. If it is root then above commant is right.)

    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

    sudo cp -a openerp-7.0 server

    (name openerp-7.0 may differ. Just type the name of folder you untar under /opt/openerp)

    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.

    Now open file openerp-server

    sudo nano /etc/openerp-server.conf

    Toward to the top of the file change the line db_password = False to the same password you used back in step 3.

    Also add a line at the end of same 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.

    enter “ctrl+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.

    Now we will make a file in /etc/init.d with name openerp-server.So type:

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

    This will open an empty file openerp-server.Copy below code


    to openerp-server file and save this file.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

    If everything above seems to be working OK then your server will be started and you can check it here in your browser:

    http://IP_or_domain.com:8069

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

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

     

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    Be the first to comment.

    Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again
    Close