阿里云部署 CentOS7.4+Python3.6+Postgresql10+Odoo12+OpenResty1.13(Nginx1.13) 实例教程
-
你好 请教下 跟着步骤安装 出现以下问题,怎么解决? 谢谢
[root@li1079-129 ~]# sudo systemctl status odoo
● odoo.service - Odoo
Loaded: loaded (/usr/lib/systemd/system/odoo.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2018-10-17 20:54:47 CST; 13min ago
Process: 859 ExecStart=/home/wwwroot/crazytoucan.com/odoo-bin -c /etc/odoo/odoo.conf (code=exited, status=203/EXEC)
Main PID: 859 (code=exited, status=203/EXEC)Oct 17 20:54:47 li1079-129.members.linode.com systemd[1]: Started Odoo.
Oct 17 20:54:47 li1079-129.members.linode.com systemd[1]: Starting Odoo...
Oct 17 20:54:47 li1079-129.members.linode.com systemd[859]: Failed at step EXEC spawning /home/wwwroot...ed
Oct 17 20:54:47 li1079-129.members.linode.com systemd[1]: odoo.service: main process exited, code=exit...EC
Oct 17 20:54:47 li1079-129.members.linode.com systemd[1]: Unit odoo.service entered failed state.
Oct 17 20:54:47 li1079-129.members.linode.com systemd[1]: odoo.service failed.
Hint: Some lines were ellipsized, use -l to show in full. -
@CTF20007 @zhangodoo @mark7788 这个教程有个BUG,如果按照教程中所交代的从http://nightly.odoo.com/12.0/nightly/src/odoo_12.0.latest.tar.gz这里下载的odoo12安装包里面有一个坑,就是在odoo安装源中是不包含odoo-bin这个执行脚本的,所以你们在最后启动时会卡在Process: 859 ExecStart=/home/wwwroot/crazytoucan.com/odoo-bin -c /etc/odoo/odoo.conf (code=exited, status=203/EXEC)
Main PID: 859 (code=exited, status=203/EXEC)这里,因为那里根本就没有odoo-bin文件。解决方法其实很简单,vi odoo-bin 创建一个odoo-bin文件,手动添加如下全部内容:
#!/usr/bin/env python3set server timezone in UTC before time module imported
import('os').environ['TZ'] = 'UTC'
import odooif name == "main":
odoo.cli.main()保存退出后还要给odoo-bin提权,所以运行chmod +x odoo-bin命令即可。好了现在你可以reboot一下,odoo12就可以跑起来了。其实还有另一个解决方法更简单,那就是不要从nightly.odoo.com下载源,改为从Odoo GitHub存储库中克隆Odoo 12源代码:
git clone https://www.github.com/odoo/odoo --depth 1 --branch 12.0 /opt/odoo12/odoo
这个克隆代码里面原生带好了odoo-bin文件,不会出现上述问题,但是git在国内访问速度非常慢,你需要梯子。