赞
踩
yuan ma si liao qq1030460562
- deb http://mirrors.aliyun.com/ubuntu/ bionic main multiverse restricted universe
- deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main multiverse restricted universe
- deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main multiverse restricted universe
- deb http://mirrors.aliyun.com/ubuntu/ bionic-security main multiverse restricted universe
- deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main multiverse restricted universe
- deb-src http://mirrors.aliyun.com/ubuntu/ bionic main multiverse restricted universe
- deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main multiverse restricted universe
- deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main multiverse restricted universe
- deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main multiverse restricted universe
- deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main multiverse restricted universe
下面依次安装
sudo apt update && apt upgrade -y
sudo apt install python3-pip build-essential wget python3-dev python3-venv python3-wheel libxml2-dev libxslt-dev libzip-dev libldap2-dev libpq-dev libsasl2-dev python3-setuptools node-less nodejs npm
sudo useradd -m -d /opt/odoo14 -U -r -s /bin/bash odoo14
安装数据库
sudo apt-get install -y postgresql
sudo su - postgres -c "createuser -s odoo14"
安装wkhtmltopdf
wget https://builds.wkhtmltopdf.org/0.12.1.4/wkhtmltox_0.12.1.4-1.bionic_amd64.deb
sudo apt install ./wkhtmltox_0.12.1.4-1.bionic_amd64.deb
拷贝到ubutnu home目录下,然后使用命令将其拷贝到对应工作目录
sudo cp -rf ~/odoo /opt/odoo14
授权
sudo su - odoo14
cd /opt/odoo14
python3 -m venv odoo-venv
source odoo-venv/bin/activate
【先把pip3切换到阿里源:
mkdir ~/.pip
vi ~/.pip/pip.conf
# 然后将下面这两行复制进去就好了
[global]
index-url = https://mirrors.aliyun.com/pypi/simple
】
pip3 install wheel
pip3 install -r /opt/odoo14/odoo/requirements.txt
deactivate
mkdir /opt/odoo14/odoo-custom-addons
exit
vi /etc/odoo14.conf
[options]
; This is the password that allows database operations:
admin_passwd = admin
db_host = False
db_port = False
db_user = odoo14
db_password = False
;logfile = /opt/odoo14/odoo14.log
addons_path = /opt/odoo14/odoo/odoo/addons,/opt/odoo14/odoo-custom-addons
vi /etc/systemd/system/odoo14.service
[Unit]
Description=Odoo14
Requires=postgresql.service
After=network.target postgresql.service
[Service]
Type=simple
SyslogIdentifier=odoo14
PermissionsStartOnly=true
User=odoo14
Group=odoo14
ExecStart=/opt/odoo14/odoo-venv/bin/python3 /opt/odoo14/odoo/odoo-bin -c /etc/odoo14.conf
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl restart odoo14
sudo systemctl enable odoo14
sudo systemctl status odoo14
以上就是安装全部命令了呢,有什么问题欢迎大家留言。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。