support Click to see our new support page.

HOW TO INSTALL ODOO 12 ON UBUNTU 18.4

how to install odoo 12 on ubundu
Author

Sarin RajMay 10, 2019

installation of Odoo 12 On Ubuntu 18.4

Odoo is the most famous all-in-one business software in the world. It offers a range of business applications including CRM, website, e-Commerce, billing, accounting, manufacturing, warehouse, project management, inventory and much more, all seamlessly integrated. The latest version of Odoo; Odoo 12 which includes new features and also new modules. For the Installation of Odoo 12 on Ubuntu 18.04 you just need to follow the below steps:

STEP 1:

To Update apt source-lists

sudo apt-get update

 

 STEP 2 :

Install Updates Follow the bellow command

sudo apt-get -y upgrade

STEP 3 :

Create the a Odoo 12 user which will own and then run the application

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

 

STEP 4 :

We use PostgreSQL so Install PostgreSQL Database and also configure it.

sudo apt-get install -y postgresql

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

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

Give a role password for the newly created role and then verify it by giving password again.

exit

 

 STEP 5 :

Install pip3 in our server

sudo apt-get install -y python3-pip

Install Python Dependencies for Odoo 12

To switch in to the odoo user and then install the dependency packages.

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

 

STEP 6 :

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 
sudo python3 -m pip install libsass

 

STEP 7 :

Install Odoo community version 12 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 12.0 of Odoo from Github:

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

And then exit from the odoo user

exit

 

 STEP 8 :

Create configuration file to run as a service.

Copy and paste below content in config file, write correct addons paths.

sudo vim /etc/odoo-server.conf
[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/odoo/addons,/opt/odoo/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

 

STEP 9 :

Create Odoo Log File

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

 

 STEP 10 :

You can copy and then 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 11 :

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

update-rc.d odoo-server defaults

STEP 12 :

RUNNING ODOO 12 LOCAL SYSTEM

SWICH TO THE 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

STEP 13 : 

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

In short, now on wards installation of Odoo will be very easy. If you enjoy our content here, you’ll ❤️ the stuff we share on LinkedIn.

Odoo_erp_services

LinkedIn LinkedIn