一、更新系统
yum update -y
二、安装python3
yum install gcc gcc-c++ openssl-devel bzip2-devel libffi-devel libxml2-devel libxslt-devel libjpeg-turbo-devel openldap-devel -y
wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz
tar xzf Python-3.8.5.tgz
cd Python-3.8.5
./configure --enable-optimizations
sudo make altinstall
三、安装数据库(postgresql)
sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum -y install epel-release yum-utils
sudo yum-config-manager --enable pgdg12
sudo yum -y install postgresql12-server postgresql12 postgresql-devel
sudo /usr/pgsql-12/bin/postgresql-12-setup initdb
# 初始化数据库master密码
sudo passwd postgres
# 启动服务
systemctl start postgresql-12.service
systemctl status postgresql-12.service
systemctl restart postgresql-12.service
# 创建用户
sudo useradd -m -d /opt/odoo -U -r -s /bin/bash odoo
sudo su - postgres -c "createuser -s odoo"
四、安装odoo15
# 创建用户odoo
sudo su - odoo
mkdir -p /data/odoo
wget http://nightly.odoo.com/15.0/nightly/src/odoo_15.0.20211005.tar.gz
tar xzf odoo_15.0.20211005.tar.gz
mv odoo-15.0* odoo15
pip3.8 install -r /data/odoo/odoo15/requirements.txt -i https://pypi.douban.com/simple/
cd odoo15/
cp setup/odoo odoo-bin
chmod +x odoo-bin
mkdir -p /data/odoo/odoo-custom-addons
# 创建配置文件 /etc/odoo.conf,复制以下内容到文件中保存
[options]
; This is the password that allows database operations:
admin_passwd = `设置的数据库master密码`
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /data/odoo/odoo15/odoo/addons,/data/odoo/odoo-custom-addons
# 启动服务
/data/odoo/odoo15/odoo-bin -c /etc/odoo.conf
# 访问地址http://{ip}:8069
# 默认用户为admin:admin,登录后可修改密码