Loading... (0%)

Post published: Post last modified: 05 April 2014

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.

OpenERP


Table of contents:

  1. PostgreSQL Server Installation and Configuration
  2. OpenERP Server Installation
  3. OpenERP Client Installation
  4. OpenERP Web Installation
  5. OpenERP Configuration
  6. Instructions for OpenERP version 6.1/7.0
  7. Installation of pgAdmin 3 (optional)
  8. 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

http://localhost:8069

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



 


Related Images: