2的账号
useradd nagios –s /sbin/nologin //‐config //安装示例配置文件,安装的路径是/usr/local/nagios/etc
make install安装完成nagios存放nagios配置文件存放目录
libexec 网页文件存放位置
var 、安装nagios里,别搞错了
make
make install
chown –R nagios:nagios /usr/local/nagios //下面去
的配置文件,我只把改的地方贴出来
vi /usr/local/apache2/conf/httpd.conf
User nagios //把apache别忘记了重启apache脚本控制文件cgi.cfg
vi /usr/local/nagios/etc/cgi.cfg
use_authentication=1 //打开验证
default_user_name=test
authorized_for_system_information=nagiosadmin,test
authorized_for_configuration_information=nagiosadmin,test
authorized_for_system_commands=nagiosadmin,test
authorized_for_all_services=nagiosadmin,test
authorized_for_all_hosts=nagiosadmin,test
authorized_for_all_service_commands=nagiosadmin,test
authorized_for_all_host_commands=nagiosadmin,test
//服务的关闭、重启等操作‐c /usr/local/nagios/etc/htpasswd test
new password: 再次确认
adding password for user test //你的服务器IP/nagios由于我们目前是没有监控任何的主机,所以目前还是看不到什么有用的东西的。