Odoo安装简述

odoo 安装

安装 postgresql 12

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |sudo tee  /etc/apt/sources.list.d/pgdg.list
sudo apt -y install postgresql-12 postgresql-client-12

创建 postgresql odoo用户和密码

sudo adduser --system --home=/opt/odoo --group odoo

测试 postgresql

sudo su - postgres
psql

配置 postgresql 允许外部访问

vim /etc/postgresql/12/main/postgresql.conf 

# Listen on all interfaces
listen_addresses = '*'

### python3环境准备

sudo apt install python3-dev python3-pip -y sudo apt install build-essential libxslt-dev libzip-dev libldap2-dev libsasl2-dev libssl-dev -y

下载odoo 源码

创建odoo目录 并进入

git clone https://github.com/odoo/odoo.git -b 12.0 --depth=1 
pip3 install -r requirements.txt
pip3 install num2words phonenumbers psycopg2-binary watchdog xlwt

设置odoo 数据库配置

cp ./debian/odoo.conf ./odoo12.conf

修改 odoo12.conf

[options]
; This is the password that allows database operations:
admin_passwd = admin
db_host = 127.0.0.1 //本地服务器
db_port = False
db_user = odoo
db_password = password  //密码
;addons_path = /usr/lib/python3/dist-packages/odoo/addons

启动 odoo

./odoo-bin -c odoo12.conf


140 Words

2020-01-12 20:22 +0100