Installing OpenERP on CentOS 6

 

openerp logo

What is OpenERP?

OpenERP is an open source full suite of Business software, and is published under the AGPL license.
OpenERP contains over 700 modules such as sales management, Customer Relationship Management (CRM), warehouse management, association, project management, human resources management, point of sales and around

 

Installing OpenERP on CentOS 6

Installing OpenERP on CentOS can be tricky due to the lack of documentations. Most of the documentations are for Ubuntu/Debian distro.

OpenERP requires Python and PostgreSQL to run.

First step is to update the OS System & Packages

yum -y update
Installing wget in case it’s not installed

 

yum -y install wget

Downloading the epel-release (Extra Packages for Enterprise Linux) and installing the packages

rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Downloading the PostgreSQL and installing the packages

rpm -ivh http://yum.pgrpms.org/9.1/redhat/rhel-6Server-x86_64/pgdg-redhat91-9.1-5.noarch.rpm

Installing Packages & Dependencies

yum -y install python-psycopg2 python-lxml PyXML python-setuptools libxslt-python pytz python-matplotlib python-babel python-mako python-dateutil python-psycopg2 pychart pydot python-reportlab python-devel python-imaging python-vobject hippo-canvas-python mx python-gdata python-ldap python-openid python-werkzeug python-vatnumber pygtk2 glade3 pydot python-dateutil python-matplotlib pygtk2 glade3 pydot python-dateutil python-matplotlib python python-devel python-psutil python-docutils make automake gcc gcc-c++ kernel-devel byacc flashplugin-nonfree postgresql91-libs postgresql91-server postgresql91 libxslt-devel

Initializing PostgreSQL

service postgresql-9.1 initdb

Allowing remote access to PostgreSQL

echo “listen_addresses = ‘*'” >> /var/lib/pgsql/9.1/data/postgresql.conf

By Default, PostgreSQL refuses all connections, so we have to add the IP addresses and subnet.
You can replace 0.0.0.0/0 by your IP address and subnet mask to allow access from a certain IP address.

echo “host all all 0.0.0.0/0 md5” >> /var/lib/pgsql/9.1/data/pg_hba.conf

Starting PostgreSQL

service postgresql-9.1 start

Starting PostgreSQL after every reboot

chkconfig postgresql-9.1 on

Creating PostgreSQL user and database

su – postgres -c “createuser –pwprompt –createdb –no-createrole –no-superuser openerp”

Downloading the Python client library for Google data APIs

cd /tmp
wget http://gdata-python-client.googlecode.com/files/gdata-2.0.17.zip

Unziping and Installing it

unzip gdata-2.0.17.zip
rm -rf gdata-2.0.17.zip
cd gdata*
python setup.py install

 Adding OpenERP user to work with OpenERP. Never use root!

adduser openerp

Creating runtime directory and log directory and changing the owner to the previous created user

mkdir /var/run/openerp
mkdir /var/log/openerp
chown openerp.openerp /var/run/openerp

If a previous version of openerp exists, remove it

rm -rf openerp*

Downloading OpenERP, extracting it to a directory called “openerp”, and installing it

wget http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz
tar -zxvf openerp-7.0-latest.tar.gz  –transform ‘s!^[^/]+($|/)!openerp1!’
cd openerp
python setup.py install

If OpenERP was previously installed, remove it

rm -rf /usr/local/bin/openerp-server

Copy configuration files from OpenERP directory to their correct destination

cp openerp-server /usr/local/bin
cp install/openerp-server.init /etc/init.d/openerp
cp install/openerp-server.conf /etc
chmod u+x /etc/init.d/openerp

Start OpenERP after every reboot

chkconfig openerp on

Start OpenERP

service openerp start

That’s it!
You should be able to access OpenERP on your server’s IP, port 8069
xxx.xxx.xxx.xxx:8069

And you should see a screen like this:

OpenERP on CentOS 6

Have some questions? Leave us a comment below!

4 thoughts on “Installing OpenERP on CentOS 6”

  1. Hi, I have a question regarding OpenERP 7.0 on Centos 6, do you know if we have to install Openerp as a service on the root ? or could we install it on the public_html folder?
    I am wondering if we want to run OpenERP for two different companies : company1.domain.com and company2.domain.com
    maybe it is possible do have as well something like Openerp.domainalpha.com and Openerp.domainbeta.com
    Than you for your blog for centos… nowadays everything is write for ubuntu.

    Frank

  2. Hello,

    Yes you have to install openerp as a root service,

    There are few methods to have two different companies on the same server:
    1- you can create 2 different databases with the same openerp installation, the first database could be accessed using xxx.xxx.xxx.xxx:8069?db=company1 and xxx.xxx.xxx.xxx:8069?db=company2

    2- You can have two different installations of openErp, every installation in a different path, different postgresql and every installation listening on a different port, different logs and different config files and start script. Basically this is not easy, but I'm sure you can find more help on openErp forums.

    In Either cases, whether you go with option 1 or option 2, and assuming you have only one IP address on your server, you will have to install a webserver like apache, setup virtualhosts and use it as a proxy to redirect your company1.domain.com or company2.domain.com to the correct database or installation

    Hope this helps

Leave a Reply

Your email address will not be published.