odoo 14 @debian

# 下載
git clone https://github.com/odoo/odoo.git

# python 3
sudo apt install python3 python3-pip

# postgresql
sudo apt install postgresql postgresql-client

# 新增odoo使用者
sudo useradd -m -d /opt/odoo -U -r -s /bin/bash odoo



# 安裝必要套件  *Debian buster已把libjpeg8-dev移除, 要改用libjpeg62-turbo
sudo apt install python3-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev \
    libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev libfreetype6-dev \
    liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev libpq-dev
# Debian用
sudo apt install python3-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev \
    libtiff5-dev libjpeg62-turbo-dev libopenjp2-7-dev zlib1g-dev libfreetype6-dev \
    liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev libpq-dev

# 自行尋找 https://github.com/wkhtmltopdf/wkhtmltopdf/releases
sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb
sudo dpkg -i ./wkhtmltox_0.12.5-1.buster_amd64.deb

# 複制odoo到/opt
sudo cp odoo/ /opt -R

# 切換odoo使用者安裝python套件
sudo su - odoo
cd /opt/odoo
pip3 install setuptools wheel
pip3 install -r requirements.txt

# 新增postgreSQL資料庫及使用者
sudo -u postgres createuser -s odoo
createdb odoo

#啟動
python3 odoo-bin --addons-path=addons -d mydb

# 開啟瀏覽器 localhost:8069

P.S:
# 為postgreSQL使用者加密碼
sudo -u postgres psql postgres
alter user postgres with password 'postgres';

發佈留言