In this article, we will show you how to install Odoo 12 on Ubuntu 16.04. Odoo (formerly OpenERP) is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, ERP, a point of sale, project management, and many more. Odoo comes in two editions, an open-source Community Edition, and Enterprise edition, the licensed one. In our case, we will install and use the Community edition of Odoo.
Table of Contents
1. Requirements
The minimum system requirements for Odoo running 5 users is 2 CPU Cores and 2Gb of RAM memory. We will be using our VPS SSD 2 Plan for the purpose of this tutorial.
- Ubuntu 16.04 VPS
- PostgreSQL server
- Python version 3.5
- Apache web server
- SSH access with root privileges
2. Log in via SSH and update the system
Log in to your Ubuntu 16.04 VPS with SSH as a root user
ssh root@IP_Address -p Port_number
You can check whether you have the proper Ubuntu version installed on your server with the following command:
# lsb_release -a
You should get this output:
Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial
Once you are logged in, run the following command to update all installed packages to the latest available version
apt-get update && apt upgrade
3. Install PostgreSQL server
Odoo requires a PostgreSQL database to store its information, so we will have to install the PostgreSQL server. We will install a PostgreSQL server using the following command:
apt-get install postgresql
Once installed, start the PostgreSQL server and enable it to start at server boot.
systemctl start postgresql systemctl enable postgresql
Follow this tutorial for detailed instructions on how to install Postgre SQL on Ubuntu 16.04
3. Add repository and install Odoo
Odoo is not available in the official Ubuntu 16.04 repository, so in order to install it, we will need to add the Odoo repository to the server. In order to do it, run the following commands
wget -O - https://nightly.odoo.com/odoo.key | apt-key add - echo "deb http://nightly.odoo.com/12.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list
4. Install Odoo 12 on Ubuntu
Next, update the local package database
apt-get update
and install Odoo using the apt package manager
apt-get install odoo
This command will install Odoo, Python 3 and all necessary Python modules, create PostgreSQL user and start the Odoo instance. After the installation is completed, you can check the status of the Odoo service:
systemctl status odoo
Output:
● odoo.service - Odoo Open Source ERP and CRM Loaded: loaded (/lib/systemd/system/odoo.service; enabled; vendor preset: enabled) Active: active (running) Main PID: 7693 (odoo) CGroup: /system.slice/odoo.service └─7693 /usr/bin/python3 /usr/bin/odoo --config /etc/odoo/odoo.conf --logfile /var/log/odoo/odoo-server.log
After the installation is completed, edit Odoo’s configuration file and set the master admin password.
nano /etc/odoo/odoo.conf
Uncomment the ‘admin_passwrd’ line, and change the admin_password field with a strong password.
admin_passwd = STRONG_PASSWORD
To put these changes into effect, restart Odoo
systemctl restart odoo
At this point, you can open your favorite web browser and access your Odoo at http://your_IP_Address:8069
5. Apache installation
Check whether Apache is already installed and running on your server. You can do this with the following command:
dpkg -l apache2
If Apache is not installed, you can do this by executing the following commands.
apt-get install apache2
After the installation is complete, you should enable Apache to start automatically upon server boot with:
systemctl enable apache2
You can also check the status of your Apache service with the following command:
systemctl status apache2
Now that we are sure that Apache is installed and running on our server we can continue with the next step and set up an Odoo reverse proxy.
To the next step, we will need to enable some additional proxy modules for Apache. To enable these modules, execute the following commands:
a2enmod proxy a2enmod proxy_http
Once this is done, open a new configuration file using nano or your favorite text editor with the following command:
nano /etc/apache2/sites-available/your_domain.conf
Add the following lines:
<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>
Enable “your_domain.conf” configuration in Apache using:
ln -s /etc/apache2/sites-available/your_domain.conf /etc/apache2/sites-enabled/your_domain.conf
Remember to replace your ‘your_domain.com’ with your actual domain name. Save the changes and restart the Apache web server for the changes to take effect:
service apache2 restart
That’s it. If you followed all of the instructions properly now you should be able to access your Odoo 12 with your domain name on your Ubuntu 16.04 machine. For more information about Odoo 12, its features and configuration, please check their official documentation.
Of course, you don’t have to install Odoo 12 on Ubuntu 16.04 if you use one of our Odoo VPS Hosting services, in which case you can simply ask our expert Linux admins to install Odoo 12 on Ubuntu 16.04, for you. They are available 24×7 and will take care of your request immediately.
If you decided to upgrade your Ubuntu, and plan on installing the improved Odoo 13, we have a solution for that. You can check out our guide on how to install Odoo 13 on Ubuntu 18.04, and do it one step at a time.
PS. If you liked this post, on installing Odoo 12 on Ubuntu 16.04 with Apache as a reverse proxy, please share it with your friends on the social networks using the buttons below or simply leave a comment in the comments section. Thanks.
Please advice steps to Install wkhtmltopdf for Odoo 12 version on Ubuntu 16.4 LTS
You can use the following commands:
Thank You Very Much. !!!
Please let me know how to install Enterprise version on Ubuntu 18 AWS EC . Thank you
The tutorial will work on any server which has SSH root access (or a user with sudo privileges). Please note, if you want to use the Enterprise version of Odoo you will need to buy an Odoo Enterprise license.