Install Odoo 10 on CentOS 7 with Apache as a reverse proxy


install odoo 10 on centos 7
Odoo (formerly known as OpenERP) is a suite of web-based enterprise management applications. It is one of the most popular and powerful Open Source ERP business software based on the Python programming language.

Odoo’s business apps are organized into 6 groups: front-end applications, sales management applications, business operations applications, marketing applications, human resources and productivity applications. They can be used as stand-alone applications and they can be integrated seamlessly so you can get a full-featured Open Source ERP.

In this tutorial, we will install the latest Odoo 10 version and configure Apache as a reverse proxy so you can access your Odoo app via a domain without typing Odoo’s port in the URL.

Requirements

For this tutorial, we will be using our SSD 1 Linux VPS hosting plan with CentOS 7 as an operating system.

Log in to your server via SSH:

# ssh root@server_ip

Before starting, enter the command below to check whether you have the proper version of CentOS installed on your machine:

# cat /etc/redhat-release

which should give you the underneath output:

CentOS Linux release 7.2.1511 (Core)

Update the system

Make sure your server is fully up to date:

# yum update

Once this is done, install the EPEL repository:

# yum install -y epel-release

Install PostgreSQL

Odoo uses PostgreSQL, therefore let’s install it along with some much-needed dependencies. Execute the below command:

# yum install postgresql-server fontconfig libpng libX11 libXext libXrender xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi wkhtmltopdf yum-utils

Now initialize the PostgreSQL database:

# postgresql-setup initdb

Enable PostgreSQL to start on boot and start the service using:

# systemctl enable postgresql

# systemctl start postgresql

Install Odoo 10

Add the Odoo repository:

# yum-config-manager --add-repo=https://nightly.odoo.com/10.0/nightly/rpm/odoo.repo

Update the package index and install Odoo 10:

# yum update && yum install odoo

Once the installation is completed, enable Odoo to start on boot:

# systemctl enable odoo

Start Odoo:

# systemctl start odoo

Check if Odoo is working:

# ps aux |grep odoo

Odoo’s default master password is set to ‘admin‘. Let’s change this. Open the configuration file for Odoo with your favorite text editor. We are using nano:

# nano /etc/odoo/odoo.conf

Uncomment (delete ;) the admin_passwd line and set your new master password. Be sure to use a strong password. You can generate one through the command line. Save and close the file. Restart Odoo for the changes to take effect:

# systemctl restart odoo

Configure Apache

Last but not least, you need to configure Apache as a reverse proxy to avoid using Odoo’s port in the web browser when accessing Odoo. But first things first, let’s install Apache:

# yum install httpd

Enable it to start on boot, then start Apache:

# systemctl enable httpd

# systemctl start httpd

Now, let’s do the actual reverse proxy configuration. Open a new config file for your domain:

# nano /etc/httpd/conf.d/your_domain.conf

Paste the following:

<VirtualHost *:80>
ServerName your_domain.com
ServerAlias www.your_domain.com

ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass / http://your_domain.com:8069/
ProxyPassReverse / http://your_domain.com:8069/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>

Of course don’t forget to replace your_domain.com with your actual domain. Save and close the file, then restart Apache for the changes to take effect:

# service httpd restart

Congratulations, if you followed the instructions carefully, you have successfully installed Odoo 10 on your CentOS 7 VPS. You can now open your favorite web browser and navigate to your Odoo instance using the domain you configured earlier. Create your first database and start using Odoo 10.


Of course you don’t have to do any of this if you use one of our Odoo VPS Hosting services, in which case you can simply ask our expert Linux admins to install and configure Odoo 10 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 below or simply leave a reply. Thanks.

Tutorials
How to install, configure and use GIT on an Ubuntu 14.04 LTS VPS
Tutorials
How to set up LAMP (Linux, Apache, MariaDB, PHP) stack on Debian Wheezy
Tutorials
How to install Joomla 2.5 in CentOS 6
  • santhosh

    santhoshsanthosh

    Author Reply

    Hai Admin.
    while installing odoo in my server with centos 7.3, when i traid this command “yum update && yum install odoo” am getting bellow error
    Error: Package: python-xlwt-0.7.4-5.el7.noarch (epel)
    Requires: antlr-python
    Error: Package: odoo-9.0c_20170111-1.noarch (odoo-nightly)
    Requires: python-jinja2
    Error: Package: odoo-9.0c_20170111-1.noarch (odoo-nightly)
    Requires: python-docutils
    Error: Package: odoo-9.0c_20170111-1.noarch (odoo-nightly)
    Requires: libxslt-python
    You could try using –skip-broken to work around the problem
    ** Found 6 pre-existing rpmdb problem(s), ‘yum check’ output follows:
    ipa-admintools-4.4.0-12.el7.centos.noarch has installed conflicts freeipa-admintools: ipa-admintools-4.4.0-12.el7.centos.noarch
    ipa-client-4.4.0-12.el7.centos.x86_64 has installed conflicts freeipa-client: ipa-client-4.4.0-12.el7.centos.x86_64
    ipa-client-common-4.4.0-12.el7.centos.noarch has installed conflicts freeipa-client-common: ipa-client-common-4.4.0-12.el7.centos.noarch
    ipa-common-4.4.0-12.el7.centos.noarch has installed conflicts freeipa-common: ipa-common-4.4.0-12.el7.centos.noarch
    ipa-server-4.4.0-12.el7.centos.x86_64 has installed conflicts freeipa-server: ipa-server-4.4.0-12.el7.centos.x86_64
    ipa-server-common-4.4.0-12.el7.centos.noarch has installed conflicts freeipa-server-common: ipa-server-common-4.4.0-12.el7.centos.noarch

    help me


    • admin

      adminadmin

      Author Reply

      Are you trying to install Odoo 9? Check which repositories are enabled on your server.


  • Maxi32

    Maxi32Maxi32

    Author Reply

    I tried this on a clean VPS and I got a message:

    “The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later”

    4-5 times tried this. Something wrong with the latest update of Odoo or the apache.


    • admin

      adminadmin

      Author Reply

      Did you check the log files for more details about the issue?


  • Cristian

    CristianCristian

    Author Reply

    Hello,

    Thank you for this tutorial! It worked for me until the reverse proxy configuration. There is no httpd folder inside etc end when I try to create the .conf file I get an error. What am I missing?

    Best regards,
    Cristian


    • admin

      adminadmin

      Author Reply

      Have you installed Apache on your server? You can install Apache using

      yum install httpd

      Once Apache is installed you will be able to access /etc/httpd/ and create a configuration file for your domain name.

      Also, make sure that you are running the commands as the root user.

      Thanks.


      • Cristian

        CristianCristian

        Author Reply

        Apache is installed and working… Can it be a different link due to the version of Apache? Thank you!


  • Cristian

    CristianCristian

    Author Reply

    cd: /etc/httpd/: No such file or directory


    • admin

      adminadmin

      Author Reply

      Do you use CentOS 7 or some other Linux distro?

      Thanks.


  • Cristian

    CristianCristian

    Author Reply

    Centos 7. Looks like I didn’t do my homework… Sorry for that!

    I have done some research and it looks like Apache is not installed due to a conflict with a cPanel module: Error: ea-apache24 conflicts with httpd-2.4.6-45.el7.centos.4.x86_64

    Is there a way to bypass this?

    Thank you for your help!
    Cristian


    • admin

      adminadmin

      Author Reply

      Since you have cPanel installed on your server, Apache is already installed and its configuration is in /usr/local/apache/conf/httpd.conf


  • Cristian

    CristianCristian

    Author Reply

    So where should I paste the code for the proxy configuration? Inside the httpd.conf file?

    Thank you so much!

    Cristian


    • admin

      adminadmin

      Author Reply

      Edit this file:

      /etc/httpd/conf.d/your_domain.conf

      replace your_domain.com with your actual domain.


      • Cristian

        CristianCristian

        Author Reply

        Probably I’m missing something because, as I already told you earlier, /etc/httpd/ doesn’t exist on this server… Should I create manually the folders httpd and conf.d plus the file xxxxxx.xx.conf?

        Thanks,
        Cristian


  • Nelson Ocloo

    Hi Admin I want to thank you for the steps it really help me to install Odoo on centos7


  • Solomon

    SolomonSolomon

    Author Reply

    Admin,

    How do i get Odoo 10e for this installation?