yum -y install 包名(支持*) :自动选择y,全自动

yum install 包名(支持*) :手动选择y or n

yum remove 包名(不支持*)

rpm -ivh 包名(支持*):安装rpm包

rpm -e 包名(不支持*):卸载rpm包



[root@nagios ~]# /etc/init.d/httpd status

                                   Not Found

The requested URL /server-status was not found on this server.


[root@nagios ~]# apachectl configtest

Syntax OK

用apachectl configtest 测试配置是否正确


完成以上,就重启httpd


vi 1gg 跳到第一行 或 gg


shift+g 跳到最后一行



nagios 登入无反应 


参看错误日志


[root@nagios httpd]# vi /var/log/httpd/error_log 


[Wed Jan 28 13:15:48 2015] [error] [client 192.168.157.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users

[Wed Jan 28 13:15:48 2015] [error] [client 192.168.157.1] access to /nagios failed, reason: verification of user id 'nagiosadmin' not configured


查看htpasswd.users

[root@nagios httpd]# ls -ual /usr/local/nagios/etc/htpasswd.user 

-rw-r--r--. 1 root root 26 Jan 27 17:25 /usr/local/nagios/etc/htpasswd.user


确认文件缺少s 应该是htpasswd.users


重新登入后 能够正常正常