目录
2、配置 supervisor web管理工具,方便管理可以不开
8、打开浏览器检查Supervisor http://127.0.0.1:8888
1、安装 supervisor
sudo apt-get install supervisor
2、配置 supervisor web管理工具,方便管理可以不开
vi /etc/supervisor/supervisord.conf
[inet_http_server] ; inet (TCP) server disabled by default
port=*:8888 ; (ip_address:port specifier, *:port for all iface)
username=admin ; (default is no username (open server))
password=123 ; (default is no password (open server))
重启服务:
service supervisor restart
3、查看odoo配置
ps -ef | grep odoo
cat /etc/odoo/odoo.conf
[options]
; This is the password that allows database operations:
; admin_passwd = admin
addons_path = /usr/lib/python3/dist-packages/odoo/addons
db_host=localhost
db_port=5432
db_user=***
db_password = ***
dbfilter=***
log_level = info
limit_time_real = 1200
addons_path 是odoo默认的插件位置,上一层/usr/lib/python3/dist-packages/odoo 是odoo默认安装位置。
4、创建supervisor odoo配置
vi /etc/supervisor/conf.d/odoo.conf
内容如下:
[program:odoo.Server]
directory = /usr/lib/python3/dist-packages/odoo
command = /usr/bin/odoo --config /etc/odoo/odoo.conf --logfile /var/log/odoo/odoo-server.log
user = odoo
stopsignal=INT
autostart=true
autorestart=true
startsecs=1
stdout_logfile = /var/log/odoo/odoo-12.log
stderr_logfile = /var/log/odoo/odoo-12.error.log
5、刷新 supervisor服务
supervisorctl update
7、禁用、停止 odoo 系统服务
sudo systemctl stop odoo
sudo systemctl disable odoo