DEV Community

Salah Elhossiny
Salah Elhossiny

Posted on

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

Enter fullscreen mode Exit fullscreen mode
  • 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

Enter fullscreen mode Exit fullscreen mode

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

$ sudo apt-get install -f
Enter fullscreen mode Exit fullscreen mode
  • Now, install the PostgreSQL database:

$ sudo apt install postgresql -y
Enter fullscreen mode Exit fullscreen mode
  • Configure PostgreSQL:

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

Enter fullscreen mode Exit fullscreen mode
  • Configure git :

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

Enter fullscreen mode Exit fullscreen mode

Create an odoo-14.0 virtual environment and activate it:

$ python3 -m venv ~/venv-odoo-14.0
$ source ~/venv-odoo-14.0/bin/activate
Enter fullscreen mode Exit fullscreen mode
  • Install the Python dependencies of Odoo in venv :
$ cd ~/odoo-dev/odoo/
$ pip3 install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode
  • 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$

Enter fullscreen mode Exit fullscreen mode
  • 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

Enter fullscreen mode Exit fullscreen mode
  • Point your browser to http://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

Enter fullscreen mode Exit fullscreen mode

Discussion (0)