Ubuntu18服务器部署odoo13

1、安装语言包

sudo apt-get update && sudo apt-get upgrade

sudo apt install language-pack-zh-hans-base language-pack-zh-hans

sudo update-locale LANG=zh_CN.UTF-8 LANGUAGE="zh_CN:zh"

source /etc/default/locale


选择性

安装python3.8

sudo apt install python3.8.2

python3.8 -V

which python3.8

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8

sudo apt-get remove --purge python-apt

sudo apt-get install -f -y python-apt

cd /usr/lib/python3/dist-packages/

sudo cp apt_pkg.cpython-36m-x86_64-linux-gnu.so apt_pkg.so


2、新建odoo用户并赋予sudo权限

sudo adduser odoo

sudo adduser odoo sudo


3、切换到odoo用户

su odoo


4、安装psql12

sudo apt-get install curl ca-certificates gnupg

curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

sudo apt-get update

sudo apt-get install postgresql-12


5、在postgresql里创建odoo用户

sudo su postgres

psql

create user odoo superuser password 'odoo';

\q

exit


6、去官网上下odoo社区版代码

git clone https://github.com/odoo/odoo.git


7、将代码切换到13.0的分支然后装环境

cd odoo

git checkout 13.0

apt-get install libxml2-dev libxslt-dev python3-dev libsasl2-dev libldap2-dev

pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

pip3 install PyPDF2 passlib werkzeug==0.14.1 lxml polib Pillow psutil -i https://pypi.tuna.tsinghua.edu.cn/simple

apt-get install build-dep python-psycopg2

sudo pip3 install psycopg2 -i https://pypi.tuna.tsinghua.edu.cn/simple

你可能感兴趣的:(Ubuntu18服务器部署odoo13)