Install Odoo 11 On Ubuntu 16.04
By Muhamed Yasir,

  Category: Server     Comments: 4

Odoo is an amazing open ERP platform and it’s version Odoo 11 is an astounding Open Source ERP business software version based on the Python programming language. Installing Odoo 11 on Ubuntu 16.04 is not a herculean task. You just need to follow the below steps to install Odoo 11 on Ubuntu 16.04 using github Odoo source code:

Step 1: 

Update apt source-lists:

sudo apt-get update

Step 2: 

Create the Odoo user that will own and run the application.

sudo adduser --system --home=/opt/odoo --group odoo

Step 3: 

Install and configure the database server, PostgreSQL.

sudo apt-get install -y postgresql

Once the PostgreSQL installation is completed, we need to create a postgres user to communicate with Odoo.

sudo service postgresql start
sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo

Enter password for new role: *****

Enter it again: *****

Now exit from the postgres

exit
sudo service postgresql restart

Step 4: 

Install the Python libraries & other needed libraries required for Odoo:

Odoo 11 uses python 3.x and python 3.5 is already installed on Ubuntu 16.04 by default. So in order to install all dependent libraries easily we`ll install pip3 in our server:

sudo apt-get install -y python3-pip

Once pip3 is installed on server,  now we can install other dependent libraries using pip3:

pip3 install Babel decorator docutils ebaysdk feedparser gevent greenlet html2text Jinja2 lxml Mako MarkupSafe mock num2words ofxparse passlib Pillow psutil psycogreen psycopg2 pydot pyparsing PyPDF2 pyserial python-dateutil python-openid pytz pyusb PyYAML qrcode reportlab requests six suds-jurko vatnumber vobject Werkzeug XlsxWriter xlwt xlrd

Next is to install Odoo Web Dependencies:

sudo apt-get install -y npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g less less-plugin-clean-css
sudo apt-get install -y node-less 

Step 5:

Install Odoo community version 11 which is available in GITHUB.

Below command to install GIT on your system. If it is already there, then you can ignore this.

sudo apt-get install -y git

Switch to the Odoo user:

sudo su - odoo -s /bin/bash

Clone branch 11.0 of Odoo from Github:

git clone https://www.github.com/odoo/odoo --depth 1 --branch 11.0 --single-branch .

Now exit from the odoo user account:

exit

Step 6:

Create configuration file to run as a service.

sudo vim /etc/odoo-server.conf

A sample configuration file is as like this:

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = odoo
db_password = False
logfile = /var/log/odoo/odoo-server.log
addons_path = /opt/odoo/addons,/opt/odoo/odoo/addons

Now set the ownership and permission of the configuration file:

sudo chown odoo: /etc/odoo-server.conf
sudo chmod 640 /etc/odoo-server.conf

Now create a directory for storing logs of Odoo server and assigning proper ownership to the directory:

sudo mkdir /var/log/odoo
sudo chown odoo:root /var/log/odoo

Step 7:

You can copy and paste the script to this file.

sudo vim /etc/init.d/odoo-server

Now change the ownership and permission of the file. The init script will be run by the root user.

sudo chmod 755 /etc/init.d/odoo-server
sudo chown root: /etc/init.d/odoo-server

Step 8:

Test the server running as service

To start the Odoo sever:

sudo /etc/init.d/odoo-server start

For stopping the Odoo server:

sudo /etc/init.d/odoo-server stop

To view the log file of odoo server:

tailf /var/log/odoo/odoo-server.log

Now, if you want to add this service to begin on boot up, you can simply use:

update-rc.d odoo-server defaults

To run manually:

Switch to odoo user

sudo su – odoo -s /bin/bash

Run the server

/opt/odoo/odoo-bin

If everything is fine, then you can check Odoo server running on your browser with url:

http://localhost:8069

or

http://0.0.0.0:8069

If there is any error, you can see in the log.

Install wkhtmltopdf

If wkhtmltopdf is not installed in your system, You cannot print any pdf reports and it will show you the error ‘Unable to find Wkhtmltopdf on this system‘. To overcome this error, install the right version of wkhtmltopdf as below.

sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin

 

Hope you have configured the Odoo 11 on Ubuntu 16.04 properly. Explore !!!!!!!!! 🙂

4
Leave a Reply

avatar
3 Comment threads
1 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
3 Comment authors
Jasadfayyas kpanri Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
anri
Guest
anri

can`t copy and paste… when try to run odoo get this. odoo@odoo-11-prime-beta:/home/odoo_seminar$ /opt/odoo/odoo-bin Traceback (most recent call last): File “/opt/odoo/odoo-bin”, line 5, in import odoo File “/opt/odoo/odoo/__init__.py”, line 84, in from . import modules File “/opt/odoo/odoo/modules/__init__.py”, line 8, in from . import db, graph, loading, migration, module, registry File “/opt/odoo/odoo/modules/graph.py”, line 10, in import odoo.tools as tools File “/opt/odoo/odoo/tools/__init__.py”, line 7, in from . import pdf File “/opt/odoo/odoo/tools/pdf.py”, line 4, in from PyPDF2 import PdfFileWriter, PdfFileReader ImportError: No module named ‘PyPDF2’

fayyas kp
Guest

ImportError: No module named pypdf2
Use the below code to install – via terminal

pip install pypdf2

Jasad
Guest

ImportError: No module named pypdf2

pip3 install PyPDF2

Jasad
Guest

If you face this error:

ImportError: No module named ‘passlib’
Then try:

pip3 install passlib

shares