How to easily install Odoo on Ubuntu

  • Run the following commands to install the main dependencies:
$ sudo apt-get update

$ sudo apt install git python3-pip build-essential wget
python3-dev python3-venv python3-wheel libxslt-dev
libzip-dev libldap2-dev libsasl2-dev python3-setuptools
libpng12-0 libjpeg-dev gdebi -y
  • Download and install wkhtmltopdf :
$ wget https://github.com/wkhtmltopdf/wkhtmltopdf/
releases/download/0.12.5/wkhtmltox_0.12.5-1.trusty_amd64.
deb

$ sudo dpkg -i wkhtmltox_0.12.5-1.trusty_amd64.deb

If you find errors in a previous command, force install the dependencies with the following command:

$ sudo apt-get install -f
  • Now, install the PostgreSQL database:

$ sudo apt install postgresql -y

Configure PostgreSQL:


$ sudo -u postgres createuser --superuser $(whoami)

Configure git :


$ git config --global user.name "Your Name"
$ git config --global user.email youremail@example.com

Create an odoo-14.0 virtual environment and activate it:

$ python3 -m venv ~/venv-odoo-14.0
$ source ~/venv-odoo-14.0/bin/activate
  • Install the Python dependencies of Odoo in venv :
$ cd ~/odoo-dev/odoo/
$ pip3 install -r requirements.txt
  • Create and start your first Odoo instances:

$ createdb odoo-test
$ python3 odoo-bin -d odoo-test –i base --addons-path=addons --db-filter=odoo-test$
  • Clone the Odoo code base:
$ mkdir ~/odoo-dev
$ cd ~/odoo-dev
$ git clone -b 14.0 --single-branch --depth 1 https://github.com/odoo/odoo.git
  • Point your browser to localhost:8069 and authenticate it by using the admin account and using admin as the password

Note

If you need RTL support, please install node and rtlcss via the following command:

sudo apt-get install nodejs npm -y
sudo npm install -g rtlcss