如何检测和重启Apache和Lighttpd
作者: 出处: 更新时间:2007-10-25 责任编辑:
 
 

: Command to stop lighttpd server
if failed host 127.0.0.1 port 80 : Server IP address and port number (80)
protocol http then restart : If above IP and port failed restart the webserver
if 5 restarts within 5 cycles then timeout : Try to restart 5 times; if monit cannot restart webserver 5 times; just time out to avoid race condition.

Here is my mysql server restart configuration directives:

check process mysqld with pidfile /var/run/mysqld/mysqld.pid

group database

start program = "/etc/init.d/mysqld start"

stop program = "/etc/init.d/mysqld stop"

if failed host 127.0.0.1 port 3306 then restart

if 5 restarts within 5 cycles then timeout


Here is my sshd server configuration directives:

check process sshd with pidfile /var/run/sshd.pid

start program "/etc/init.d/sshd start"

stop program "/etc/init.d/sshd stop"

if failed host 127.0.0.1 port 22 protocol ssh then restart

if 5 restarts within 5 cycles then timeout


Replace IP address 127.0.0.1 with your actual IP address. If you are using Debian just start monit:

# /etc/init.d/monit start

If you are using Red Hat Enterprise Linux , start monit from /etc/inittab file:

Open /etc/inittab file:

# vi /etc/inittab

 
     
 
 
后退<<上一页 继续>>下一页
[上一页][第1页][第2页][第3页][第4页][第5页][第6页][下一页]
 
内容导航  
第1页如何检测和重启Apache.. 第2页如何检测和重启Apache..
第3页如何检测和重启Apache.. 第4页如何检测和重启Apache..
第5页如何检测和重启Apache.. 第6页lighttpd
上一篇 : lighttpd 安装过程 下一篇Lighttpd的安装配置(web..
 
  您要为所发表的言论的后果负责,请各位遵纪守法并注意文明用语
标题:  

[ 关于本站 ] [ 广告服务 ] [ 商务合作 ] [ 联系我们 ] [ 合作伙伴 ] [ 法律顾问 ] [ 网站地图 ]
千橡公司 京ICP证041489号 Copyright (c) 1997-2007 All Right Reserved.