Cara Install odoo 13 di Ubuntu 18.04

1) Login sebagai root dan lakukan apt update

sudo su
sudo apt update


2. Buat nama user "Odoo" yang nanti akan menjalankan aplikasi

root@alpha:~$ useradd -d /home/odoo -m odoo -s /bin/bash
root@alpha:~$ passwd odoo  
root@alpha:~$ adduser odoo sudo


3. Install postgresql

sudo apt install -y postgresql
sudo systemctl start postgresql


4. Buat odoo user

sudo su postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
exit


5. Clone the latest Odoo

su odoo
sudo git clone https://github.com/odoo/odoo.git --depth 1 --branch 13.0 --single-branch odoo13


6. Install python dependency

sudo apt install wget git python-pip gdebi-core python3-dev libxml2-dev libxslt-dev libldap2-dev libsasl2-dev


7. Install wkhtml

sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.1.4-2/wkhtmltox_0.12.1.4-2.bionic_amd64.deb
sudo dpkg-iwkhtmltox_0.12.1.4-2.bionic_amd64.deb


8. Install python 3 dependency

cd odoo
sudo apt install python3-pip
pip3 install -r requirements.txt







Catatan :


Cara solve error pidfile already exists: /var/run/odoo-server13-skm.pid

odoo@odoo-skm:/etc/init.d$ sudo /etc/init.d/odoo-server13-skm start
pidfile already exists: /var/run/odoo-server13-skm.pid
odoo@odoo-skm:/etc/init.d$
sudo rm /var/run/odoo-server13-skm.pid

Cara install postgresql spesifik versi

sudo apt-get install postgresql-10


Cara disabled versi postgresql

sudo nano /etc/postgresql/10/main/start.conf

kemudian restart postgresql


Cara melihat postgre versi yang sedang berjalan

odoo@serverkm:/home/saranakm$ pg_lsclusters
Ver Cluster Port Status Owner    Data directory               Log file
9.6 main    5432 down   postgres /var/lib/postgresql/9.6/main /var/log/postgresql/postgresql-9.6-main.log
10  main    5434 online postgres /var/lib/postgresql/10/main  /var/log/postgresql/postgresql-10-main.log
13  main    5433 down   postgres /var/lib/postgresql/13/main  /var/log/postgresql/postgresql-13-main.log