How to install Odoo 9 on a CentOS 7 VPS


odooOdoo is one of the most popular and most powerful Open Source ERP business software based on the Python programming language. In this blog article we will show you how to install Odoo 9 on a CentOS 7 VPS. This new version of Odoo comes with many improvements over its predecessor and many new features such us:

  • New WYSIWYG website editor
  • Drag and drop building blocks
  • New payment gateway integration
  • Ebay and Amazon integration
  • New contract management
  • New accounting
  • New marketing apps
  • Fully responsive and fast design
  • Improved dashboards and reports
  •  Shops and restaurants management

and many more…

Log in to your server as user root

ssh root@IP

At the very beginning it is best to start a screen session by executing the following command

screen -U -S odoo

and make sure that all services installed on your server are up to date

yum -y update

Odoo uses a PostgreSQL database, so we have to remove MariaDBserver if it is installed

yum remove mariadb mariadb-server

In order to install all Odoo 9 dependencies the EPEL repository must be added to the distribution’s repositories

yum install -y epel-release

Install PostgreSQL server

yum install -y postgresql-server

Once it is installed and started for the first time, we have to initialize the PostgreSQL database

postgresql-setup initdb

Start the PostgreSQL server and enable it to start at boot time

systemctl start postgresql
systemctl enable postgresql

Create new yum repository for Odoo

nano /etc/yum.repos.d/odoo.repo

With the following content

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

and finally install Odoo 9

yum install -y odoo

This will install the latest version of Odoo and all its dependencies.

After the installation is completed, start Odoo and enable it to start at boot times

systemctl start odoo
systemctl enable odoo

Open Odoo’s configuration file and uncomment the ‘admin_passwd’ line to set the admin master password

vim /etc/odoo/openerp-server.conf

admin_passwd = YourPassword

Don’t forget to replace ‘YourPassword’ with an actual strong password.

Restart Odoo for the changes to take effect

systemctl restart odoo

In order to print PDF reports, wkhtmltopdf has to be installed on your server. The version of wkhtmltopdf available in the CentOS repositories does not support headers and footers, so we will download it and manualy install wkhtmltopdf from their official website.

Install some wkhtmltopdf dependencies

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

Copy the appropriate rpm file from wkhtmltopdf’s website and install it using the following command

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

Now, open a web browser and access Odoo 9 at http://yourIPaddress:8069 to create a new PostgreSQL database and set password for the admin user.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Odoo 9 for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Tutorials
How to install Exponent CMS on a Linux Virtual Server
Tutorials
Install the Sails.js framework on an Ubuntu VPS
Tutorials
How to change the default SSH port on a Linux VPS
  • Tharanga Jayasinghe

    100% working without any hazel.
    Great article.


  • Dedur

    DedurDedur

    Author Reply

    Great tutorial, thank you very much!

    Because my browser could not connect to provided port, I have put two other commands, to unlock connection:
    firewall-cmd –zone=public –add-port=8069/tcp –permanent
    firewall-cmd –reload

    Now it works perfect!


    • Sandro

      SandroSandro

      Author Reply

      As Odoo uses port 8069, we’ll need to allow firewall for remote access. We can allow firewall to port 8069 by running the following command.

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


  • Francesco

    FrancescoFrancesco

    Author Reply

    Tanks so much!

    Concise, clear and foolproof guide. All I need is there, without omission or totally useless informations.

    Tanks again.


  • Paulo

    PauloPaulo

    Author Reply

    You save my day with This so clear tutorial.

    Thanks a lot
    Paulo
    Lisbon, Portugal


  • Sahadat Hossain

    If I want to keep mariaDB and postgresql together than what I have to do?

    Because I also want to install redmine software which need mariaDB server


    • admin

      adminadmin

      Author Reply

      There is no problem running PostgreSQL and MariaDB on the same server.

      By default, PostgreSQL listens on port 5432, and MariaDB listens on port 3306.


  • Mark Awitan

    I got an error when creating a database.

    Database creation error: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) HINT: Use the same encoding as in the template database, or use template0 as template.


  • Muralidharan

    Hi Admin
    I got this error while installing oodo. Could tell me any solution for me. I am using Cent OS – 7
    Downloading packages:
    warning: /var/cache/yum/x86_64/7/odoo-nightly/packages/odoo_9.0c.20160217.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 8183cbb5: NOKEY
    Retrieving key from https://nightly.odoo.com/odoo.key
    GPG key retrieval failed: [Errno 14] curl#60 – “Peer’s certificate issuer has been marked as not trusted by the user.”


    • admin

      adminadmin

      Author Reply

      It means that the certificate presented by Odoo is not trusted by your certificate store. Reinstall the ‘ca-certificates’ package and try again.


  • Masum

    MasumMasum

    Author Reply

    Hello, i am having problem Data directory is not empty! on CentOS

    Distributor ID: CentOS
    Description: CentOS Linux release 7.2.1511 (Core)
    Release: 7.2.1511
    Codename: Core

    [root@TXDEV-01 ~]# postgresql-setup initdb
    Data directory is not empty!
    [root@TXDEV-01 ~]#

    Please help


    • admin

      adminadmin

      Author Reply

      You should run ‘postgresql-setup initdb’ only once. Most likely, You have already done that.

      Thanks.


  • Choki

    ChokiChoki

    Author Reply

    Hello, thank you for this Turtorial, when installing odoo I’m having this message :

    “cannot find a valid baseur1 for repo: odoo-nightly”


  • THINKCEPT

    THINKCEPTTHINKCEPT

    Author Reply

    Can we install ODOO on a particular account in a VPS? If we have a VPS already hosting multiple website, how to install odoo and point it to a domain/subdomain ?


  • Alaa Alnajjar

    You have to copy files wkhtmltopdf and wkhtmltoimage to /usr/bin , at least that’s how it worked for me:

    sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
    sudo cp /usr/local/bin/wkhtmltoimage /usr/bin


  • CokoTracy

    CokoTracyCokoTracy

    Author Reply

    Working like a charm with zero hazel, all the works took me 5 minutes for the job to be done. The simply the better.


  • Ansar

    AnsarAnsar

    Author Reply

    Exceptional… works like a charm! Thank you.


  • Sergio Ortega

    Excellent!


  • Paulo Afonso

    Hi All

    We are using Odoo 9.0, and we have a great dobts, on all of our communication we send our IP public address instedad of our DNS server public name. (for instance: http/94.12.12.12:8069 and we want erp.wwtsl.net, that are mapped on noIp diretly to that port and IP).

    Can anyone help to change this? We want all communication, inside and outside of our domain must be with DNS server name not public IP!

    Thnx in Advance for your time

    Paulo Afonso


    • admin

      adminadmin

      Author Reply

      We cannot tell you for sure, because we are not familiar with your server configuration. If you have an Apache web server you can configure it as a reverse proxy, so it can handle and pass all requests to Odoo, hiding the port number.

      More information about this you can find at https://httpd.apache.org/docs/current/mod/mod_proxy.html


  • John

    JohnJohn

    Author Reply

    Hi admin,
    do you have any direction how to install odoo deployment with multiple instance on centos 7?


  • Omair

    OmairOmair

    Author Reply

    Perfect man Thank you so much. Worked like a diva :D