CentOS6.4下源代码安装以及nginx配置
-
已保存到印象笔记中
-
[quote author=Jeff link=topic=7293.msg16747#msg16747 date=1372082025]
转载到我的博客了,谢谢楼主好文章。
[/quote]
你的博客是??? -
[quote author=jinyong link=topic=7293.msg16765#msg16765 date=1372237230]
楼主我按照你的方法装了一遍启动服务的时候报错如下:
[root@fedorasystem oe7]# service oe7server start
Starting oe7server (via systemctl): Job for oe7server.service failed. See 'systemctl status oe7server.service' and 'journalctl -xn' for details.
[失败]
系统是 fedora 18
[/quote]
我要申明一下,我这个步骤只是我在CentOS6.4下面亲测(因为服务器LINUX我还是偏向CentOS的,所以将我的经验拿来分享一下),至于fedora我没有测试过,上面我把每一个步骤干什么都写清楚了,你要注意一下版本(特别是x86_64跟i686),至于其他版本的LINUX我不能保证啊
个人建议:通过日志来排查错误
你可以看两个日志文件一个是oe7的,默认/var/log/openerp/open-XXX.log (如果你指定了日志文件,请检查指定的位置)
另一个是系统的日志文件,/var/log/messages
可以用tail -f logfile 命令来等待日志追加,然后在执行service oe7server start,这时候日志会追加信息
一般服务起不来多半跟端口占用或者缺少软件包有关,如果严格按照上述按住步骤来的话,软件包缺少的可能性较小,你检查一下是否端口被占用了 -
楼主的模块安装命令有不少重复和错误的包名字,
更正下:
# yum install python-dateutil python-docutils python-feedparser python-imaging python-jinja2 python-ldap libxslt-python python-lxml python-mako python-mock python-openid python-psutil python-psycopg2 python-reportlab python-yaml pywebdav python-vobject python-vatnumber python-unittest2 python-simplejson pytz python-gdata python-ZSI pychart pydot pybabel pyparsing
顺便当自己的笔记。 -
[quote author=wangbuke link=topic=7293.msg16770#msg16770 date=1372255475]
楼主的模块安装命令有不少重复和错误的包名字,
更正下:
# yum install python-dateutil python-docutils python-feedparser python-imaging python-jinja2 python-ldap libxslt-python python-lxml python-mako python-mock python-openid python-psutil python-psycopg2 python-reportlab python-yaml pywebdav python-vobject python-vatnumber python-unittest2 python-simplejson pytz python-gdata python-ZSI pychart pydot pybabel pyparsing
顺便当自己的笔记。
[/quote]
Thank you -
这次换了centons6.4 64位 完全按照楼主的方法操作启动的时候提示如下:
[root@mazenserver oe7]# service oe7server start
启动 OpenERP Server Daemon (openerp-server): [确定]
[root@mazenserver oe7]# ERROR: couldn't create the logfile directory. Logging to the standard output.
2013-06-29 19:53:34,416 1935 INFO ? openerp: OpenERP version 7.0-20130703-231023
2013-06-29 19:53:34,416 1935 INFO ? openerp: addons paths: /usr/lib/python2.6/site-packages/openerp-7.0_20130703_231023-py2.6.egg/openerp/addons
2013-06-29 19:53:34,416 1935 INFO ? openerp: database hostname: localhost
2013-06-29 19:53:34,416 1935 INFO ? openerp: database port: 5432
2013-06-29 19:53:34,416 1935 INFO ? openerp: database user: openerp
Traceback (most recent call last):
File "/usr/bin/openerp-server", line 5, in <module>
pkg_resources.run_script('openerp==7.0-20130703-231023', 'openerp-server')
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 461, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1194, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20130703_231023-py2.6.egg/EGG-INFO/scripts/openerp-server", line 5, in <module>
openerp.cli.main()
File "/usr/lib/python2.6/site-packages/openerp-7.0_20130703_231023-py2.6.egg/openerp/cli/init.py", line 61, in main
o.run(args)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20130703_231023-py2.6.egg/openerp/cli/server.py", line 265, in run
main(args)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20130703_231023-py2.6.egg/openerp/cli/server.py", line 245, in main
setup_pid_file()
File "/usr/lib/python2.6/site-packages/openerp-7.0_20130703_231023-py2.6.egg/openerp/cli/server.py", line 88, in setup_pid_file
fd = open(config['pidfile'], 'w')
IOError: [Errno 2] 没有那个文件或目录: '/var/run/openerp/openerp-server.pid' -
[quote author=jinyong link=topic=7293.msg16851#msg16851 date=1372908239]
这次换了centons6.4 64位 完全按照楼主的方法操作启动的时候提示如下:
[root@mazenserver oe7]# service oe7server start
启动 OpenERP Server Daemon (openerp-server): [确定]
[root@mazenserver oe7]# ERROR: couldn't create the logfile directory. Logging to the standard output.
2013-06-29 19:53:34,416 1935 INFO ? openerp: OpenERP version 7.0-20130703-231023
2013-06-29 19:53:34,416 1935 INFO ? openerp: addons paths: /usr/lib/python2.6/site-packages/openerp-7.0_20130703_231023-py2.6.egg/openerp/addons
2013-06-29 19:53:34,416 1935 INFO ? openerp: database hostname: localhost
2013-06-29 19:53:34,416 1935 INFO ? openerp: database port: 5432
2013-06-29 19:53:34,416 1935 INFO ? openerp: database user: openerp
Traceback (most recent call last):
File "/usr/bin/openerp-server", line 5, in <module>
pkg_resources.run_script('openerp==7.0-20130703-231023', 'openerp-server')
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 461, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1194, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20130703_231023-py2.6.egg/EGG-INFO/scripts/openerp-server", line 5, in <module>
openerp.cli.main()
File "/usr/lib/python2.6/site-packages/openerp-7.0_20130703_231023-py2.6.egg/openerp/cli/init.py", line 61, in main
o.run(args)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20130703_231023-py2.6.egg/openerp/cli/server.py", line 265, in run
main(args)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20130703_231023-py2.6.egg/openerp/cli/server.py", line 245, in main
setup_pid_file()
File "/usr/lib/python2.6/site-packages/openerp-7.0_20130703_231023-py2.6.egg/openerp/cli/server.py", line 88, in setup_pid_file
fd = open(config['pidfile'], 'w')
IOError: [Errno 2] 没有那个文件或目录: '/var/run/openerp/openerp-server.pid'
[/quote]
基本上可以确定是权限问题,我原帖里面没有说关于日志的默认输出路径以及权限设置
默认情况下oe的日志输出路径为/var/log/openerp/openerp-server.log
“[color=red][root@mazenserver oe7]# ERROR: couldn't create the logfile directory. Logging to the standard output.[/color]”
这个错误提示说的是不能创建日志文件目录,日志记录到标准输出(也就是屏幕),这基本上说明是权限不够的问题
这个提示同时也表明如果日志文件不能创建,其实并不影响OE启动
“[color=red]IOError: [Errno 2] 没有那个文件或目录: '/var/run/openerp/openerp-server.pid'[/color]”这个错误说明OE启动的时候无法创建这个文件导致的
每次OE启动会创建一个PID文件,这个文件里面只有一个数值,就是当前启动成功后的OE进程ID。这个文件无法创建应该是影响OE启动的
请你在/var/run/目录下创建一个openerp目录,并且把它授权给你的oe用户 -
启动时报错:
# service oe7server start
Starting OpenERP Server Daemon (openerp-server): execvp: No such file or directory
[ OK ]
关闭或者重启时报错:
# service oe7server restart
Stopping OpenERP Server Daemon (openerp-server): cat: /var/run/openerp/openerp-server.pid: No such file or directory
[FAILED]
Starting OpenERP Server Daemon (openerp-server): execvp: No such file or directory
[ OK ]
在线求助。