monit:无法识别的服务

时间:2014-12-20 10:45:50

标签: linux service yum monit

我已经使用YUM在我的Centos 5.11服务器(有Webmin / Virtualmin)上安装了monit,所有看起来都没问题。我发现它并没有在启动时启动,因为当我尝试启动monit服务时,我试图让它发生,我现在得到:

# service monit start
monit: unrecognized service

我尝试删除并重新安装它......

# yum remove monit
Remove        1 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
service monit does not support chkconfig
Error in PREUN scriptlet in rpm package m

Removed:
  monit.x86_64 0:4.10.1-9.el5
Complete!

# yum install monit
Finished
Setting up Install Process
Package monit-4.10.1-9.el5.x86_64 already installed and latest version
Nothing to do

所以不重新安装它,似乎'删除'没有删除它然后安装不安装它所以我仍然得到:

# service monit start
monit: unrecognized service

有人可以建议我需要做些什么来解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

我之前遇到过这个问题,并将以下内容添加到我的monit.conf文件中,因为它在本地启动了它的Web服务。请确保通过执行“monit quit”或杀死monit进程然后“monit -t”然后“monit”来反弹monit守护程序。

# Allow localhost to start and connect to monit httpd server locally
set httpd port 2812
use address localhost
allow localhost
check system localhost