Learn How To Installing Odoo 9 Community on CentOS 7

May 30, 2019

Table of Contents

Odoo, formerly known as OpenERP, is a well-known open source ERP business platform. Enterprises of any size can benefit from Odoo, thanks to its abundant list of business-oriented features, which include website building, billing and accounting, human resources, customer relationship management, and inventory management.

In this tutorial, I will guide you through the process of installing Odoo 9 Community version on An ITWeb.Services CentOS 7 server instance.


Before you can take advantage of the instructions in this tutorial, you need to:

  • Deploy An ITWeb.Services CentOS 7 server instance from scratch.
  • https://www.itweb.services/tutorials/linux-guides/hot-backups-with-percona-xtrabackup-on-the-one-click-wordpress-app”>IT Web Services tutorial.

Step 1: Update your system

A qualified administrator will always update the system to the latest stable status:

sudo yum update
sudo reboot

Step 2: Install and configure PostgreSQL

You need to install PostgreSQL, the default database program of Odoo, to store data for Odoo.

Install the EPEL repository before you can install Odoo using YUM:

sudo yum install -y epel-release

As you see, the EPEL repository has been installed by default when you choose the IT Web Services CentOS 7 image. However, executing the command above will do no harm.

Install and configure PostgreSQL using the following commands:

sudo yum install -y postgresql-server
sudo postgresql-setup initdb
sudo systemctl start postgresql.service
sudo systemctl enable postgresql.service

For security purposes, set a password for the default PostgreSQL user “postgres”.

sudo -u postgres psql
# when prompt reads: postgres=# 
password postgres

Enter your password twice, then use the following command to quit the PostgreSQL shell.


Step 3: Install Odoo 9 Community version

Add the Odoo YUM repository to the system:

sudo vi /etc/yum.repos.d/odoo.repo

Populate the file with the following content:

name=Odoo Nightly repository

Save and quit:


Install Odoo using YUM:

sudo yum install odoo

Perform an additional security setup:

sudo sed -i "s/xmlrpc_interface =/xmlrpc_interface =" /etc/odoo/openerp-server.conf

Start the Odoo service and set it to start automatically after system reboot:

sudo systemctl start odoo.service
sudo systemctl enable odoo.service

Modify the firewall rules to allow visitors to access Odoo using PostgreSQL’s default communicating port 8069:

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

Step 4: Configure Odoo from your web browser

Visit the following address from a web browser. Be aware that the port number 8069 cannot be ignored.


In the web interface, input a database name and a password for the user “admin”, then click the “Create database” button.

After you have finished successfully setting up a database, you will be brought into the Odoo kanban where you can customize your Odoo system as you wish. But for now, you should log out (using the link at the upper right corner) and setup a master password in order to protect the Odoo database manager.

On the Odoo login interface, click the link “Manage Databases”, then click the link “set a master password”. Input your master password in the pop-up window, then click the “Continue” button.

Now, log into your Odoo system again (click the database name) to customize it.

Step 5: Install Nginx to facilitate users’ access

As a matter of convenience, you can redirect traffic on the default HTTP port (80) to the Odoo communicating port 8069, so that users will no longer need to input the port number 8069 every time they access the Odoo system.

Install Nginx using YUM:

sudo yum install nginx

Open the file “nginx.conf” with vi:

sudo vi /etc/nginx/nginx.conf

Comment out the following two lines:

location / {

They will become:

#location / {

Then add the following segment right beneath the former two lines:

location / {
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

Save and quit:


Start the Nginx service:

sudo systemctl restart nginx.service
sudo systemctl enable nginx.service

Now, you can visit the Odoo system from both port 8069 and port 80.


That’s all. Your Odoo system is ready for use.

Need help?

Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!