Cara Install odoo16 di Ubuntu 20.04 LTS
5 February, 2023 by
| No comments yet
Login sebagai root dan lakukan apt update
sudo su
sudo apt-get update

sudo apt-get upgrade

2. Buat nama user "Odoo" yang nanti akan menjalankan aplikasi
Use the -m (--create-home) option to create the user home directory as /home/username:
default shell /bin/bash and adds extra information about the user.
root@alpha:~$ useradd -d /home/odoo -m odoo -s /bin/bash
create password for odoo
root@alpha:~$ passwd odoo
root@alpha:~$ adduser odoo sudo

3. Install postgresql
sudo apt install -y postgresql
Start postgresql service

sudo systemctl start postgresql

4.Buat database user untuk odoo
sudo su postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo

5. Install pip3
sudo apt-get install -y python3-pip
install packages & libraries
sudo apt-get install python-dev python3-dev libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libpq-dev libjpeg8-dev liblcms2-dev libblas-dev libatlas-base-dev

6. create odoo16 folder
mkdir odoo16
go to odoo16 folder
cd odoo16
sudo git clone --depth 1 --branch 16.0 --single-branch .

7. Install odoo requirements

sudo pip3 install -r /opt/odoo16/requirements.txt

8. login as odoo and run ./odoo-bin

9. Create link odoo server

sudo nano /usr/bin/odoo16 and copas

cd /opt/odoo16
exec /usr/bin/python3 ./odoo-bin $@

chmod +x /usr/bin/odoo16

10.login as odoo and create odoo conf

odoo16 -sc /tmp/odoo16.conf

sudo mv /tmp/odoo16.conf /etc/

11. Crete bootable file 

nano /etc/init.d/odoo-server10

7. Install wkhtml
sudo wget
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

sudo apt-get install python3-passlib python3-pypdf2 python3-babel python3-werkzeug python3-lxml python3-decorator python3-dateutil python3-polib python3-pil python3-psutil python3-reportlab python3-psycopg2 python3-html2text python3-docutils python3-jinja2

sudo apt-get install python3-pypdf2
sudo apt-get install python3-babel
sudo apt-get install python3-werkzeug
sudo apt-get install python3-lxml
sudo apt-get install python3-decorator
sudo apt-get install python3-dateutil
sudo apt-get install python3-polib
sudo apt-get install python3-pil
sudo apt-get install python3-psutil
sudo apt-get install python3-reportlab
sudo apt-get install python3-psycopg2
sudo apt-get install python3-html2text
sudo apt-get install python3-docutils
sudo apt-get install python3-jinja2
sudo apt-get install python3-stdnum

Catatan :

Cara solve error pidfile already exists: /var/run/
odoo@odoo-skm:/etc/init.d$ sudo /etc/init.d/odoo-server13-skm start
pidfile already exists: /var/run/
sudo rm /var/run/
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
Administrator 5 February, 2023
Share this post
Sign in to leave a comment