Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Installation OpenERP 6.1 on Ubuntu

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1.10k
    Comment on it

    Step 1. Build your server

    you can install the openssh-server during the install procedure or install subsequently depending on your preference.

    <pre>sudo apt-get install openssh-server denyhosts</pre>
    

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

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

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

    Now were 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

    A question was asked many times that for 6.0 how to run 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 runs you will be in openerps home directory: /opt/openerp.

    When you have done what you need you can leave the OpenERP users 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

    Update 27/02/2012: Many thanks to Gavin for reporting. Have added python-simplejson to the package list.

    sudo apt-get install python-dateutil python-feedparser python-gdata \ python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 \ python-pybabel python-pychart python-pydot python-pyparsing python-reportlab \ python-simplejson python-tz python-vatnumber python-vobject python-webdav \ python-werkzeug python-xlwt python-yaml python-zsi, found it necessary to install a more recent version of Werkzeug using Pythons own package management library PIP. The python pip tool can be installed like this:

     sudo apt-get install python-pip

    Then remove Ubuntus packaged version of werkzeug:
    
        sudo apt-get remove python-werkzeug
    Then install the up-to-date version of werkzeug:
    

     sudo pip install werkzeug


    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 its 6.1-1; I got the download links from their download page.

    wget http://nightly.openerp.com/6.1/releases/openerp-6.1-1.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-6.1-1.tar.gz

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

    sudo chown -R openerp: *
    sudo cp -a openerp-6.1-1 server


    Step 6. Configuring the OpenERP application

      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.

      sudo nano /etc/openerp-server.conf

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

    Step 7. Installing the boot script

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

    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

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

    OpenERP 6.1 Home 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

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


    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

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

    References

    1. /www.theopensourcerer.com
    2. https://doc.odoo.com

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: