Odoo (formerly OpenERP) is a comprehensive suite of business applications including Sales, CRM, Project management, Warehouse management, Manufacturing, Financial management and Human Resources just to name a few. Over 700 OpenERP modules are available on Launchpad.
Table of contents:
- PostgreSQL Server Installation and Configuration
- OpenERP Server Installation
- OpenERP Client Installation
- OpenERP Web Installation
- OpenERP Configuration
- Instructions for OpenERP version 6.1/7.0
- Installation of pgAdmin 3 (optional)
- Gallery
Systems used:
- Linux Fedora 16 (32bit), PostgresSQL 9.1, Python 2.7, OpenERP 6.0.4.
- Linux Fedora 17 XFCE (32bit), PostgresSQL 9.1.3, Python 2.7.3, OpenERP 6.1.
- CentOS 6.4 (64bit), PostgresSQL 9.2.8, Python 2.6.6, OpenERP 7.0.
- SElinux disabled.
PostgreSQL Server Installation and Configuration
Installation
- Go to Applications > System Tools > Add/Remove Software, type postgresql-server into search field and press Find OR go to Applications > System Tools > Terminal and type in this command to get PostgreSQL server installed:
sudo yum install postgresql-server postgresql
If you have a problems to run this command saying that your user is not on sudoers file, then you must apply these little changes to sudoers file:
Log in as root
su -
and use this command
visudo
Add your username under root’s line:
[...]
#Allow root to run any commands anywhere
root ALL=(ALL) ALL
donatas ALL=(ALL) ALL
[...]
- Select package postgresql-server-9.x.x-x.fc16 and click on Apply. System will offer you two extra packages – postgresql and postgresql-libs – select Continue to continue. You also will be asked to provide root’s password.
- After installing the packages, a database needs to be initialized and configured. To do this use Terminal (in fact, do not close current Terminal window during the installation process). First of all, log in as posgresql user using command
If you’re not logged in as a root user, do it now, otherwise you won’t be able to login as postgres user:
su -
su postgres
and then initialize the database using command
initdb /var/lib/pgsql/data
or
initdb /var/lib/pgsql/9.x/data
for PostgreSQL 9.x version (change x to a version number you are using).
Leave postgresql’s shell:
exit
And root’s shell too:
exit
- The following commands will start PostgreSQL server and check for running PostgreSQL processes:
sudo service postgresql start
ps -eZ | grep postgres
- Add postgresql server to startup list:
sudo chkconfig --level 235 postgresql on
Configuration
- After installation of PostgreSQL is finished, we must create a PostgreSQL user. It have to be the same user as your system user, in other words, be called the same name. In my case it’s user donatas. This user will be the owner of all tables created by OpenERP.
su -
su postgres
createuser donatas
NOTE: use the name of your system user instead of donatas!
Shall the new role be a superuser? (y/n) y
- Let’s now check what tables has been created so far:
psql -l
- If you can see the table template1 on the list, run the following command to use this table
psql template1
and this command to grant an access to your newly created PostgreSQL user (in this case user donatas with the password your-very_secret-password (NOTE: be creative and choose your own password!))
alter role donatas with password 'your-very_secret-password';
and get back to user’s shell
\q
exit
exit
- Changes to PostgreSQL configuration file. Open file pg_hba.conf using your preferred text editor
sudo vi /var/lib/pgsql/data/pg_hba.conf
or
sudo vi /var/lib/pgsql/9.x/data/pg_hba.conf
for PostgreSQL 9.x version (change x to a version number you are using).
and change following lines to
[...]
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all ident
# IPv4 local connections:
host all all 127.0.0.1/32 ident
# IPv6 local connections:
host all all ::1/128 ident
[...]
I assume that you know how to use your favourite text editor, but if not, you can ask me for a help using comments. Save the file and restart PostgreSQL Server
sudo service postgresql restart
NOTE: No OpenERP databases will be created during installation. It will be possible to create them through the OpenERP interface (either Client or Web)
Back to Table of Contents
OpenERP Server Installation
- Let’s first install required Python libraries:
sudo yum install python-psycopg2 python-lxml PyXML python-setuptools libxslt-python pytz python-matplotlib python-mako python-dateutil python-psycopg2 pychart pydot python-reportlab python-devel python-imaging python-vobject hippo-canvas-python mx
sudo easy_install PyYaml
- Now we can download OpenERP Server. At the time of writing this article it was version 6.0.4. We’ll download the package, extract it, jump to the installation folder and run installation script.
wget http://www.openerp.com/download/stable/source/openerp-server-6.0.4.tar.gz
tar -xzf openerp-server-6.0.4.tar.gz
cd openerp-server-6.0.4
sudo python setup.py install
Installation process should take a place.
Installing OpenERP Client
- Very similar way is used to install OpenERP Client
sudo yum install pygtk2 glade3 pydot python-dateutil python-matplotlib sudo yum install pygtk2 glade3 pydot python-dateutil python-matplotlib
wget http://www.openerp.com/download/stable/source/openerp-client-6.0.4.tar.gz
tar -xzf openerp-client-6.0.4.tar.gz
cd openerp-client-6.0.4
sudo python setup.py install
OpenERP Web Installation
- And quite the same steps for Web client installation too
sudo yum install python python-devel make automake gcc gcc-c++ kernel-devel byacc flashplugin-nonfree
wget http://www.openerp.com/download/stable/source/openerp-web-6.0.4.tar.gz
tar -xzf openerp-web-6.0.4.tar.gz
cd openerp-web-6.0.4
sudo python setup.py install
Back to Table of Contents
OpenERP Configuration
I’ll try to make this part as easy to follow as I can.
Well, OpenERP is already installed. Now we need to tell Fedora to start it up at boot. For that we need to create boot script for Server and Web client and also to add some changes to their configuration files.
Server Configuration
- OpenERP Server’s configuration file .openerp_serverrc is located at your user’s home directory, so let’s access it first
cd /home/donatas/
and open it in terminal with the favourite editor
sudo vi .openerp_serverrc
The lines you need to change in this file:
[...]
admin_passwd = yourDBadminPassword
db_password = your-very_secret-password
db_port = 5432
db_user = donatas
[...]
Save the file and quit.
Start up
Because of some incompatibilities between systemd and SysV, like “Services are executed in completely clean execution contexts, no context of the invoking user session is inherited. Not even $HOME or similar are set. Init scripts depending on these will not work correctly. “, I decided to use different start up options here.
- Lets first get back our old good rc.local and put two start up commands there:
sudo vi /etc/rc.d/rc.local
Make sure your file looks like this, but don’t forget to change donatas to your system user name!
#!/bin/sh
su - donatas -c "/usr/bin/openerp-server --config=/home/donatas/.openerp_serverrc" &
su - donatas -c "/usr/bin/openerp-web" &
Save the file and quit your editor.
Make rc.local file executable
sudo chmod a+x /etc/rc.d/rc.local
Back to Table of Contents
Installation of pgAdmin 3 (optional)
pgAdmin III is a powerful administration and development platform for the PostgreSQL database, free for any use.
To install pgAdmin 3 use this command in Terminal
sudo yum install pgadmin3
OR find it on Applications > System Tools > Add/Remove Software.
To run pgAdmin use this path: Applications > Programming
Run OpenERP
Now you can access OpenERP Web client through your browser
and create new databases using password from admin_passwd line 😉
OpenERP Client can be launched using this command in Terminal
/usr/bin/openerp-client
Back to Table of Contents
Instructions for OpenERP version 6.1/7.0
First of all install and configure PostgreSQL server as shown here
Install almost the same packages as for OpenERP version 6.0.4:
sudo yum 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 make automake gcc gcc-c++ kernel-devel byacc flashplugin-nonfree
Download 6.1/7.0 All-in-one package from openerp.com to your user’s directory:
wget http://nightly.openerp.com/6.1/releases/openerp-6.1-latest.tar.gz
or
wget http://nightly.openerp.com/7.0/releases/openerp-7.0-latest.tar.gz
Extract the tar.gz archive and give it a nice name:
tar xzf openerp-6.1-latest.tar.gz --transform 's!^[^/]\+\($\|/\)!openerp\1!'
or
tar xzf openerp-7.0-latest.tar.gz --transform 's!^[^/]\+\($\|/\)!openerp\1!'
Enter OpenERP 6.1/7.0 setup folder and execute installation script:
cd openerp
sudo python setup.py install
Go back to your home directory:
cd ~
Run OpenERP 6.1/7.0 Server:
/usr/bin/openerp-server
Test it on your browser – just enter this URL:
http://localhost:8069
Open OpenERP configuration file located in your home directory
vi openerp/install/openerp-server.conf
and make following changes to it:
[...]
admin_passwd = yourDBadminPassword
db_password = your-very_secret-password
db_port = 5432
db_user = donatas
[...]
Create a startup file,
sudo vi /etc/rc.d/rc.local
add these two lines to it
#!/bin/sh
su - donatas -c "/usr/bin/openerp-server --config=/home/donatas/openerp/install/openerp-server.conf" &
and make it executable
sudo chmod a+x /etc/rc.d/rc.local
Reboot your mighty machine
sudo reboot
and go to the http://localhost:8069 after reboot to see if everything works and you can create a database
Back to Table of Contents
Gallery
Here are some screenshots of OpenERP being up and running on Fedora 16
Comments
Share your opinion by posting or replying to others comments.
Manau –
June 16, 2013 at 04:00 - 11 years ago
Hello Donatas!
I am very interested into installing OpenERP 7.0 on a CentOS 6.4 i686 box, but the only PostgreSQL package I can get is postgresql-8.4.13-1.el6_3.i686. What version of OpenERP would work with such PostgreSQL packages, and what would be the detailed procedure to make it up-running-and-secure in a production environment?
Regards.
donatas –
June 16, 2013 at 04:28 - 11 years ago
Hello Manau,
The best thing to do is to install PostgreSQL version 9.x.
Installation guide using YUM. I recommend to use YUM method, because it’s easier to keep PostgreSQL updated that way.
Once you have version 9 on your machine, just follow my tutorial and you should be fine. Please let me know if something isn’t clear enough 🙂
Thank you for your feedback,
Kind regards,
Donatas
Serg –
April 1, 2013 at 08:17 - 11 years ago
Hi Danatas!
Thanks to your article, installed version 6.0.4 from the first.
As a successful upgrade to version 7.0?
I am new to Linux.
donatas –
April 1, 2013 at 14:17 - 11 years ago
Hello Serg,
Thank you for your feedback.
Unfortunately, you cannot upgrade from v.6.0.x to v7.0.x. Hovewer, OpenERP team promised easier upgrades since v.7 and another good news is that most of steps you’ve done for v6.0.4 will be the same or very similar for v.7 too as long as you are using PostgreSQL >= 9.1 and Python >= 2.6. Please refer to Instructions for OpenERP version 6.1/7.0 for this matter.
In case you are using CentOS 6, please have a look at PostgreSQL Yum Repository Howto to check how to install PostgreSQL version >= 9.1 on your machine.
Hope this helps!
Kind regards,
Donatas
Sarbjit Singh –
October 18, 2012 at 13:23 - 12 years ago
Hi
I was trying to install OpenERP 6.1 on CentOS 6.1 but facing few issues. Will you be able to assist. I’ll be very thank full to you.
—
Sarbjit Singh
donatas –
October 18, 2012 at 13:31 - 12 years ago
Hello Sarbijt,
Sure, let me know what problems do you experience.
Sarbjit Singh –
November 1, 2012 at 07:24 - 12 years ago
I did a fresh 6.0 install but problem persists. Let me know when can we do Skype session.
Awaiting your response.
Edgars –
July 9, 2012 at 22:13 - 12 years ago
Hi Donatas !
I have some problems at middle, and I was wondering, can we meet in some instant messenger, so mby I could ask you what to do ?
Wish to hear from you,
Edgars
Latvia
donatas –
July 10, 2012 at 13:49 - 12 years ago
Hi Edgards,
Could you please let me know briefly what problem do you have? It might be useful for other readers too. You can find my IM details here: http://www.bluewhaleseo.com/contacts/
Thank you