Installing Odoo 10 Community on Ubuntu 16.04

Published on: Fri, Dec 15, 2017 at 12:07 pm EST
Linux Guides Server Apps Ubuntu

Odoo, formerly known as OpenERP, is an all-in-one business management platform. Odoo offers a wide range of different applications, such as accounting, billing, project management, inventory, and much more.

Prerequisites

  • A newly deployed Vultr instance running Ubuntu 16.04.
  • A sudo user.

Step 1: Update the system

Before installing any packages on your Ubuntu instance, login using the sudo user and update.

sudo apt-get update
sudo apt-get upgrade
sudo reboot

Once the system has rebooted, log in again as the sudo user and continue with the next steps.

Step 2: Add the Odoo package repository

This allows you to install and update Odoo without having to set up all the dependencies manually yourself.

sudo wget -O - https://nightly.odoo.com/odoo.key | apt-key add -
sudo echo "deb http://nightly.odoo.com/10.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list
sudo apt-get update

Step 3: Install and configure PostgreSQL

PostgreSQL is the default database system for Odoo.

sudo apt-get install postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql

Proceed by creating a PostgreSQL user with the following commands. When prompted set a strong password for the database user and keep it in a safe place, you may need it in the future.

sudo su - postgres
createuser odoo -U postgres -dRSP
exit

Step 4: Install Odoo

You can now install Odoo.

sudo apt-get install odoo

Start Odoo and set it to start automatically when the system boots.

systemctl start odoo
systemctl enable odoo

Step 5: Configure Odoo

You can now access Odoo using your web browser at the following address.

http://[your-vultr-instance-IP]:8069

Replace [your-vultr-server-IP] with the IP address of your Vultr instance and don't forget to add the port number 8069 at the end of the address.

Choose a name for the database that Odoo will create, enter your e-mail address, and choose a password for the admin user. proceed by clicking the Create database button.

Once the database has been set up, you will be brought into the Odoo user interface where you can customize your Odoo system by installing apps.

Step 6: Install Nginx to facilitate user access

You can redirect traffic on the default HTTP port (80) and the default HTTPS port (443) to Odoo (running on port 8069) so that users no longer have to add the port number 8069 every time they access the system. Using Nginx also enables you to secure Odoo using an SSL certificate, the process to install an SSL certificate for Nginx is described here.

Install Nginx.

sudo apt-get install nginx

Edit the Nginx site configuration file using a text editor, such as nano.

nano /etc/nginx/sites-available/default

Find the following two lines.

location / {
}

Add the following segment.

location / {
    proxy_pass http://127.0.0.1:8069;
    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;
}

Restart Nginx and set it to start automatically when the system boots.

systemctl restart nginx
systemctl start nginx

You can now visit the Odoo system from both port 8069 and port 80.

http://[your-vultr-instance-IP]:8069
http://[your-vultr-instance-IP]

Want to contribute ?

You could earn up to $300 by adding new articles