Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Install Odoo 8 – CentOS 7

Our starting point is a 64-bit, fresh CentOS 7 (minimal ) machine.

Get your machine up to date before proceeding:

yum update -y

We’ll start by installing PostgreSQL

yum install postgresql postgresql-server postgresql-libs

Since this is the first time installing PostgreSQL, we’ll need to initialize the server.

postgresql-setup initdb

You should see the following which confirms success

Initializing database ... OK

Start PostgreSQL

systemctl start postgresql

Add PostgreSQL to startup

systemctl enable postgresql

We’ll need to change the password of the default user to secure things.

Move into the PostgreSQL user:

su - postgres

The shell prompt should change and you should now see something like the following:

-bash-4.2$

Log into PostgreSQL, issue the following at shell:

psql

To change the password:

\password postgres

Now, head back to root

\q
exit

Install the Epel Repo:

yum install epel-release

Add the Odoo 8 repo to CentOS at /etc/yum.repos.d/odoo.repo

[odoo-nightly]
name=Odoo Nightly repository
baseurl=http://nightly.odoo.com/8.0/nightly/rpm/
enabled=1
gpgcheck=1
gpgkey=https://nightly.odoo.com/odoo.key

Install Odoo 

yum install odoo

Edit the configuration file at /etc/odoo/openerp-server.conf, uncomment and set the admin_passwd with the password you set for the user postgres above

To print PDF reports you’ll need to install wkhtmltopdf, and to install wkhtmltopdf you’ll need to install the following dependencies

yum install libX11 libXext libpng fontconfig xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi libXrender

You’ll now need to download the appropriate version of wkhtmltopdf from wkhtmltopdf.org/downloads.html. In this case it was:

wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm
 
rpm -ivh /PATH/wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm

Start Odoo

systemctl start odoo

Add Odoo to startup

systemctl enable odoo

Now we need to open the port Odoo uses:

firewall-cmd --zone=public --add-port=8069/tcp --permanent
firewall-cmd --reload

Change PostgreSQL character encoding to UTF-8

su - postgres
psql
update pg_database set encoding = 6, datcollate = 'en_US.UTF8', datctype = 'en_US.UTF8' where datname = 'template0';
update pg_database set encoding = 6, datcollate = 'en_US.UTF8', datctype = 'en_US.UTF8' where datname = 'template1';
\q
exit

Restart PostgreSQL

systemctl restart postgresql

You should now be able to access the installation by pointing your browser to http://SERVER-IP:8069