Odoo 13 Installation on Ubuntu 19.04

In this Blog, you are going to discuss how to install the Odoo 13 Community or Enterprise version on Ubuntu 19.04. This blog covers the steps necessary for installing and configuring Odoo 13 using the Git source on an Ubuntu 19.04.

Step 1: Update Server

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get upgrade -y

Step 2: Create an odoo user and also the group in ubuntu.

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

Step 3: Install PostgreSQL Server

For the easy working of Odoo, You have to install and configure the PostgreSQL database server on the same host as odoo is running.

Now you can install the PostgreSQL database server as follows.

sudo apt-get install -y postgresql

Step 4: Create odoo user for PostgreSQL

sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true

Step 5: Install Python Dependencies  for Odoo

sudo apt-get install python3 python3-pip python3-suds -y

sudo apt-get install wget git bzr python-pip gdebi-core -y

sudo apt-get install libxml2-dev libxslt1-dev zlib1g-dev -y

sudo apt-get install libsasl2-dev libldap2-dev libssl-dev -y

Step 6: Install Python PIP Dependencies

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

Step 7:  Install other required Odoo packages

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 8:  Install Wkhtmltopdf

To print PDF reports, at that time you have to install the correct version of wkhtmltopdf.

sudo wget  https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo apt install -f
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin 
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin

Step 9: Create Log directory

sudo mkdir /var/log/$OE_USER
sudo chown $OE_USER:$OE_USER /var/log/$OE_USER

Step 10: Install Clone Odoo from Github

sudo apt-get install git
sudo git clone --depth 1 --branch 13.0 https://www.github.com/odoo/odoo /odoo/odoo-server

Step 11: Setting permissions on home folder

sudo chown -R $OE_USER:$OE_USER $OE_HOME/*

Step 12: Create a server config file

sudo touch /etc/${OE_CONFIG}.conf

sudo su root -c "printf '[options] \n; This is the password that allows database operations:\n' >> /etc/${OE_CONFIG}.conf"

sudo su root -c "printf 'admin_passwd = ${OE_SUPERADMIN}\n' >> /etc/${OE_CONFIG}.conf"

sudo su root -c "printf 'xmlrpc_port = 8069\n' >> /etc/${OE_CONFIG}.conf"

sudo su root -c "printf 'logfile = /var/log/${OE_USER}/${OE_CONFIG}.log\n' >> /etc/${OE_CONFIG}.conf"

sudo su root -c "printf 'addons_path=${OE_HOME}/enterprise/addons,${OE_HOME_EXT}/addons\n' >> /etc/${OE_CONFIG}.conf" 

Step 13: Change permission and also the user ownership of configuration file as bellow

sudo chown $OE_USER:$OE_USER /etc/${OE_CONFIG}.conf
sudo chmod 640 /etc/${OE_CONFIG}.conf

Step: 14 Create a boot script for Odoo.

sudo nano /etc/init.d/$OE_CONFIG

At that time, you can set the ownership.

sudo chmod 755 /etc/init.d/$OE_CONFIG
sudo chown root: /etc/init.d/$OE_CONFIG

Step 15: Now Start the Odoo Server

Start the Odoo Server.

sudo /etc/init.d/$OE_CONFIG start

Now you can check logs using:

tail -f /var/log/$OE_USER/$OE_CONFIG.log

Now you can start Odoo server manually for debugging.

sudo su - $OE_USER -s /bin/bash
./$OE_USER-bin -c /etc/$OE_CONFIG.conf

Now you can check your odoo instance is up and running. 

http://localhost:8069

Leave a Reply

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