linux 下使用supervisor管理源码启动的openerp
2012-07-16 21:58
453 查看
从源码启动openerp,简单的做法是添加启动脚本到/etc/init.d/rc.local等,让openerp 随系统启动而运行。此类方法只在系统启动时运行,但万一程序在运行中崩溃,您可能要等到用户发现不能使用了,才去重启服务器。下面请出今天的主角: supervisor (http://supervisord.org/)
Supervisor 是什么?
Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems.
Supervisor 是一个客户端/服务器系统,允许用户监控和控制类 Unix 操作系统上的进程数。
1、安装
debian/ubuntu
redhat/centos
2、建立openerp 的配置文件
openerp.conf 内容
3、完成!重启系统试试看openerp 是否已经启动。也可以想办法把openerp 搞崩溃,试试supervisor 能不能及时将openerp 重启
4、常用命令
Supervisor 是什么?
Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems.
Supervisor 是一个客户端/服务器系统,允许用户监控和控制类 Unix 操作系统上的进程数。
1、安装
debian/ubuntu
apt-get install supervisor
redhat/centos
yum install supervisor
2、建立openerp 的配置文件
# touch /etc/supervisor/conf.d/openerp.conf # vi /etc/supervisor/conf.d/openerp.conf
openerp.conf 内容
[program:openerp] ; openerp 启动脚本 command=python /var/www/openerp-6.1-1/openerp-server -c /var/www/openerp-6.1-1/openerp-server.conf ; openerp 目录 directory=/var/www/openerp-6.1-1/ ; 是否随系统启动 autostart=true ; 自动重启 autorestart=true ; 启动时间,如果超过这个时间oe还没有挂,则视为已经启动 startsecs=3 ; 启动用户 user=www-data redirect_stderr=true ; log 文件 stdout_logfile=/var/www/openerp-6.1-1/openerp-server.log stdout_logfile_maxbytes=500MB stdout_logfile_backups=50 stdout_capture_maxbytes=1MB stdout_events_enabled=false loglevel=warn
3、完成!重启系统试试看openerp 是否已经启动。也可以想办法把openerp 搞崩溃,试试supervisor 能不能及时将openerp 重启
4、常用命令
# supervisorctl openerp RUNNING pid 9454, uptime 4:43:34 supervisor> start openerp #启动 supervisor> stop openerp #停止 supervisor> restart openerp #重启 supervisor> status openerp #查看状态
相关文章推荐
- linux 下使用supervisor管理源码启动的openerp
- linux 下使用supervisor管理源码启动的openerp
- linux使用shell脚本管理其他服务器Tomcat启动停止、自动发布
- 使用Supervisor管理Linux进程
- Linux基本配置和管理 10 ---- Linux下使用dd命令制作ubuntu的u盘启动
- linux 使用supervisor来管理进程
- python脚步管理工具supervisor=3.3.0的安装、使用。基于linux系统。
- 使用Supervisor管理Linux进程
- Linux下使用Supervisor来管理维护程序-详解
- Linux下采用二进制源码安装mysql,并配置使用mysqld命令启动服务
- jenkins使用Git为源码管理(windows master && linux slave)
- Linux启动管理工具Grub使用专题
- jenkins使用Git为源码管理(windows master && linux slave)
- Linux下进程管理工具Supervisor的安装配置和基本使用
- Linux下进程管理工具Supervisor的安装配置和基本使用
- Linux源码安装proftpd之后无法使用service启动的解决方案
- 使用Supervisor管理Linux进程
- linux使用 supervisor 管理进程
- Beginning Linux Programming 笔记(六)使用curses管理基于文本的终端
- linux安装redis并使用其提供的初始化启动脚本加入到系统服务中