Install Odoo 14 on Ubuntu 20.04

  • Step 1:

    Installing Prerequisites

    
                  sudo apt update
    
    
                  sudo apt install git python3-pip build-essential wget python3-dev python3-venv \
                        python3-wheel libfreetype6-dev libxml2-dev libzip-dev libldap2-dev libsasl2-dev \
                        python3-setuptools node-less libjpeg-dev zlib1g-dev libpq-dev \
                        libxslt1-dev libldap2-dev libtiff5-dev libjpeg8-dev libopenjp2-7-dev \
                        liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev
    
                  

    Creating a System User

    
                  sudo useradd -m -d /opt/odoo14 -U -r -s /bin/bash odoo14
                  

    Installing and Configuring PostgreSQL

    
                  sudo apt install postgresql
    
    
                  sudo su - postgres -c "createuser -s odoo14"
    
    
                  

    Installing wkhtmltopdf

    
                  sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
    
    
                  sudo apt install ./wkhtmltox_0.12.5-1.bionic_amd64.deb
                  

    Installing and Configuring Odoo 14

                  
                  sudo su - odoo14
    
                  git clone https://www.github.com/odoo/odoo --depth 1 --branch 14.0 /opt/odoo14/odoo
    
    
                  cd /opt/odoo14
    
    
                  python3 -m venv odoo-venv
    
    
                  source odoo-venv/bin/activate
    
    
                  pip3 install wheel
    
    
                  pip3 install -r odoo/requirements.txt
    
    
                  mkdir /opt/odoo14/odoo-custom-addons
    
    
                  exit
                  

    Config file

    
                  sudo nano /etc/odoo14.conf
                  
    add the code
    
                  [options]
                  ; This is the password that allows database operations:
                  admin_passwd = my_admin_passwd
                  db_host = False
                  db_port = False
                  db_user = odoo14
                  db_password = False
                  addons_path = /opt/odoo14/odoo/addons,/opt/odoo14/odoo-custom-addons
    
    
                

    Creating Systemd Unit File

    
                sudo nano /etc/systemd/system/odoo14.service
                
    add code
    
                [Unit]
    Description=Odoo14
    Requires=postgresql.service
    After=network.target postgresql.service
    
    [Service]
    Type=simple
    SyslogIdentifier=odoo14
    PermissionsStartOnly=true
    User=odoo14
    Group=odoo14
    ExecStart=/opt/odoo14/odoo-venv/bin/python3 /opt/odoo14/odoo/odoo-bin -c /etc/odoo14.conf
    StandardOutput=journal+console
    
    [Install]
    WantedBy=multi-user.target
    
    

    Service

    
    sudo systemctl daemon-reload
    
    sudo systemctl enable --now odoo14
    
    
    sudo systemctl status odoo14
    
    
    sudo journalctl -u odoo14
    
    

    Testing the Installation

    Open your browser and type: http://:8069

    Create new db