Install Odoo 11 on Ubuntu 16.04

Odoo is likely one of the hottest enterprise softwares on this planet. There are a number of methods to put in Odoo relying on the required use case.

The simplest and quickest strategy to set up Odoo is by utilizing their official repositories.

If you wish to have extra management over variations and updates or if you wish to run a number of Odoo variations in your machine then this method is not going to be just right for you as a result of the Odoo bundle doesn’t enable a number of Odoo installations on the identical machine. On this case you possibly can both use docker and docker compose or set up Odoo in a Python digital atmosphere.

This information covers the steps mandatory for putting in and configuring Odoo utilizing Git supply and Python digital atmosphere on Ubuntu 16.04.

Earlier than persevering with with this tutorial, ensure you are logged in as a consumer with sudo privileges .

Replace the packages index and all put in packages to the newest packages:

$ sudo apt replace && sudo apt improve

Set up Git , Pip , Node.js and the instruments required to construct Odoo dependencies:

$ sudo apt set up git python3-pip build-essential python3-dev libxslt-dev libzip-dev libldap2-dev libsasl2-dev node-less

Create Odoo consumer

Create a brand new system consumer and group with house listing /choose/odoo that may run the Odoo service:

$ useradd -m -d /choose/odoo -U -r -s /bin/bash odoo

Set up and configure PostgreSQL

Set up the PostgreSQL bundle from the Ubuntu’s default repositories:

$ sudo apt set up postgresql

As soon as the set up is full create a brand new PostgreSQL consumer with the identical title because the beforehand created system consumer, in our case that’s odoo:

$ sudo su - postgres -c "createuser -s odoo"

Set up Wkhtmltopdf

With a view to print PDF reviews, you will have the wkhtmltopdf software. The advisable model of Wkhtmltopdf is 0.12.1 which isn’t obtainable within the official Ubuntu 16.04 repositories. We’ll obtain and set up the advisable model from the official Wkhtmltopdf website.

Obtain the bundle utilizing the next wget command:

$ wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~xenial_amd64.deb

As soon as the obtain is accomplished set up the bundle by typing:

$ sudo apt set up ./wkhtmltox_0.12.1.3-1~xenial_amd64.deb

Set up and configure Odoo

We are going to set up Odoo from the GitHub repository in an remoted Python atmosphere so we will have extra management over variations and updates.

Earlier than beginning with the set up course of, ensure you change to consumer “odoo”:

$ sudo su - odoo

To substantiate that you’re logged in as consumer odoo, use the next command:

$ whoami

Begin with the set up course of by cloning the Odoo supply code from the GitHub repository:

$ git clone https://www.github.com/odoo/odoo --depth 1 --branch 11.0 /choose/odoo/odoo11

virtualenv is a software to create remoted Python environments. To put in it use:

$ pip3 set up virtualenv

Create a brand new Python digital atmosphere for the Odoo set up with:

$ cd /choose/odoo
$ virtualenv odoo11-venv

Activate the atmosphere:

$ supply odoo11-venv/bin/activate

Set up all required Python modules:

(venv) $ pip3 set up -r odoo11/necessities.txt

As soon as the set up is accomplished deactivate the atmosphere and change again to your sudo consumer utilizing the next instructions:

(venv) $ deactivate
$ exit

When you intend to put in further modules it’s best to maintain these modules in a separate listing. To create a brand new listing for the extra modules run:

$ sudo mkdir /choose/odoo/odoo11-custom-addons
$ sudo chown odoo: /choose/odoo/odoo11-custom-addons

The following factor we have to do is to create a configuration file. We will both create a brand new one from scratch or copy the included configuration file:

$ sudo cp /choose/odoo/odoo11/debian/odoo.conf /and so forth/odoo11.conf

Open the file and edit it as follows:

$ sudo nano /and so forth/odoo11.conf
[choices]
; That is the password that enables database operations:
admin_passwd = my_admin_passwd
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /choose/odoo/odoo11/addons
; In case you are utilizing {custom} modules
; addons_path = /choose/odoo/odoo11/addons,/choose/odoo/odoo11-custom-addons

As soon as you’re achieved, shut and save the file.

Create a systemd unit file

To run odoo as a service we have to create a odoo11.service unit file within the /and so forth/systemd/system/ listing.

Open your textual content editor and paste the next strains:

sudo nano /and so forth/systemd/system/odoo11.service
[Unit]
Description=Odoo11
Requires=postgresql.service
After=community.goal postgresql.service
[Service]
Sort=easy
SyslogIdentifier=odoo11
PermissionsStartOnly=true
Consumer=odoo
Group=odoo
ExecStart=/choose/odoo/odoo11-venv/bin/python3 /choose/odoo/odoo11/odoo-bin -c /and so forth/odoo11.conf
StandardOutput=journal+console
[Set up]
WantedBy=multi-user.goal

Notify systemd {that a} new unit file is created and begin the Odoo service by executing:

$ sudo systemctl daemon-reload
$ sudo systemctl begin odoo11

Test the service standing with the next command:

$ sudo systemctl standing odoo11

The output ought to look one thing like beneath indicating that Odoo service is lively and operating.

Output:
● odoo11.service - Odoo11
   Loaded: loaded (/and so forth/systemd/system/odoo11.service; disabled; vendor preset: enabled)
   Lively: lively (operating) since Tue 2018-01-23 21:09:25 UTC; 1s in the past
 Predominant PID: 14146 (python3)
   CGroup: /system.slice/odoo11.service
           └─14146 /choose/odoo/odoo11-venv/bin/python3 /choose/odoo/odoo11/odoo-bin -c /and so forth/odoo11.conf

Allow the Odoo service to be routinely began at boot time:

$ sudo systemctl allow odoo11

If you wish to see the messages logged by the Odoo service you should utilize the command beneath:

$ sudo journalctl -u odoo11

Check the Set up

Open your browser and sort: http://<your_domain_or_IP_address>:8069

Assuming the set up is profitable, a display just like the next will seem:

Odoo 11 LinuxConcept

At this level you’ve gotten a working Odoo 11 set up. You’ll be able to end the set up by creating a brand new database and begin working in your undertaking.

Conclusion

This tutorial walked you thru the set up of Odoo 11 on Ubuntu 16.04 in a Python digital atmosphere.

To discover ways to configure your Odoo with Nginx as a reverse proxy and methods to entry your Odoo Set up by way of HTTPS you possibly can take a look at the next submit:

Configure Odoo with Nginx as a reverse proxy

You may additionally need to verify our tutorial about methods to create automated every day backups of your Odoo databases .

When you hit any issues, go away a remark beneath.

0 Comments

Submit a Comment

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

Related Articles