Odoo安装脚本介绍
为了帮助更多Linux服务器维护人员快速部署Odoo,为此开源智造(OSCG)基于André Schenkels曾经开放的openerp-install-scripts所构建的基础进行了全面的升级改造。最终实现一建快速部署(建议在Ubuntu 18.04 16.04中使用)。
脚本安装之前的工作(以ubuntu 18.04为例)
1. sudo nano /etc/apt/source.list 清空默认文件信息改为以下文件信息
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://archive.ubuntu.com/ubuntu/ bionic universe
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner
deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu/ bionic-security main restricted
deb http://security.ubuntu.com/ubuntu/ bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu/ bionic-security universe
deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu/ bionic-security multiverse
2.更新源信息
sudo apt-get update
3.更新服务器所有环境至最新版,确保pip3 install -r requirements.txt不会出现错误
sudo apt-get dist-upgrade
安装步骤
1. 文件获取下载
sudo wget http://www.oscg.cn/upload/tools/odoo_install.sh
2.修改下载的脚本权限
sudo chmod +x odoo_install.sh
3.执行一键服务器部署安装脚本
sudo ./odoo_install.sh
脚本参数说明
OE_USER 将是系统用户的用户名。
INSTALL_WKHTMLTOPDF 如果您不想安装Wkhtmltopdf,则设置为False,如果要安装它,则应将其设置为True。
OE_PORT 是Odoo所运行的端口,例如8069。
OE_VERSION 是要安装的Odoo版本,例如本次一键部署为Odoo V12版本,本次默认参数为12.0参数。
OE_SUPERADMIN 是此次部署Odoo安装的数据库管理密码(本次默认Odoo数据库管理密码为admin)

2020-02-23 12:59:21