Skip to content

Install Odoo 10 and Odoo 9 on a single machine


In this section, we will share with you how to install multiple Odoo, in this case we use Odoo 10 and Odoo 9, instances on a single Ubuntu 16.04 using a python virtual environment. This guide should work on other Linux VPS systems as well but was tested and written for an Ubuntu 16.04 VPS. But if you want to do in your local Ubuntu machine, you can skip step 1.
OK…Let’s start.

1. Log in to your VPS via SSH$ ssh user@vps_IP
2. Update the system and install all necessary packages:
$ sudo apt-get update && apt-get -y upgrade
$ sudo apt-get install git wkhtmltopdf python-pip python-dev python-virtualenv libevent-dev gcc libjpeg-dev libxml2-dev libssl-dev libsasl2-dev node-less libldap2-dev libxslt-dev

3. Install PostgreSQL:
$ apt install postgresql-9.5 postgresql-server-dev-9.5

$ systemctl enable postgresql.service

$ systemctl start postgresql.service

4. Create Odoo users:
$ sudo adduser --system --group odoo10 --home /opt/odoo10
$ sudo adduser --system --group odoo9 --home /opt/odoo9

5. Create PostgreSQL database users, odoo 10 and odoo 9:
$ sudo su - postgres -c "createuser --createdb --username postgres --no-createrole --no-superuser --no-password odoo10"
$ sudo su - postgres -c "createuser --createdb --username postgres --no-createrole --no-superuser --no-password odoo9"

6. Install Odoo 10:
$ sudo su - odoo10 -s /bin/bash
$ git clone https://www.github.com/odoo/odoo --depth 1 --branch 10.0 --single-branch /opt/odoo10

Then we need to create python virtual environment for Odoo 10 and install all requirements:
$ cd /opt/odoo10
$ virtualenv ./venv

$ source ./venv/bin/activate

$ pip install -r requirements.txt

Switch back your user: $ exit
7. Install Odoo 9
To install Odoo version 9, switch to user odoo9:
$ sudo su - odoo9 -s /bin/bash
Clone the Odoo 9.0 branch from github:
$ git clone https://www.github.com/odoo/odoo --depth 1 --branch 9.0 --single-branch /opt/odoo9
Create python virtual environment and install all requirements:
$ cd /opt/odoo9
$ virtualenv ./venv

$ source ./venv/bin/activate

$ pip install -r requirements.txt

Switch back your user: $ exit
8. Configure Odoo servers:
Here we need configure Odoo 10 to listen on port default 8069 and Odoo 9 to port 8010 and set the master admin password. You can also set the ports numbers as you wish.
$ sudo nano /etc/odoo10-server.conf

Copy and paste below content in config file , write correct addons paths:
[options]
admin_passwd = your_strong_admin_password

db_host = False

db_port = False

db_user = odoo10

db_password = False

addons_path = /opt/odoo10/addons

logfile = /var/log/odoo10/odoo10.log

xmlrpc_port = 8069

We do the same for Odoo 9, but with different user and port.
$ sudo nano /etc/odoo9-server.conf

Copy and paste below content in config file , write correct addons paths:
[options]
admin_passwd = your_strong_admin_password

db_host = False

db_port = False

db_user = odoo9

db_password = False

addons_path = /opt/odoo9/addons

logfile = /var/log/odoo9/odoo9.log

xmlrpc_port = 8009

9. Create System scripts for Odoo servers:
First for Odoo 10.
sudo nano /lib/systemd/system/odoo10-server.service

Copy and paste below content in config file:
[Unit]
Description=Odoo 10

Requires=postgresql.service

After=postgresql.service

[Service]
Type=simple
PermissionsStartOnly=true
User=odoo10
Group=odoo10
SyslogIdentifier=odoo10
ExecStart=/opt/odoo10/venv/bin/python2 /opt/odoo10/odoo-bin -c /etc/odoo10-server.conf
[Install]
WantedBy=multi-user.target
Then for Odoo 9.
sudo nano /lib/systemd/system/odoo9-server.service

Copy and paste below content in config file:
[Unit]
Description=Odoo 9
Requires=postgresql.service
After=postgresql.service

[Service]
Type=simple
PermissionsStartOnly=true
User=odoo9
Group=odoo9
SyslogIdentifier=odoo9
ExecStart=/opt/odoo9/venv/bin/python2 /opt/odoo9/odoo-bin -c /etc/odoo9-server.conf
[Install]
WantedBy=multi-user.target
10. Enable both Odoo instances to start on boot:
$ sudo systemctl enable odoo10.service
$ sudo systemctl enable odoo9.service

11. Start both Odoo 10 and Odoo 9 instances, run:
$ sudo systemctl start odoo10.service
$ sudo systemctl start odoo9.service

The result as you can see in our demo server here for Odoo 10 and here for Odoo 9.

2 thoughts on “Install Odoo 10 and Odoo 9 on a single machine”

  1. Attractive element of content. I just stumbled upon your blog and in accession capital to assert that I acquire actually loved account your weblog posts. Anyway I’ll be subscribing in your augment or even I fulfillment you get right of entry to consistently fast.

Leave a Reply

Your email address will not be published. Required fields are marked *