linux lighttpd nagiosQL
通过nagiosQL管理nagios非常方便,简单
1.环境:
2.下载地址
web admins
3.安装依赖包
4.添加相关用户 useradd nagios passwd nagios usermod -G nagios nagios groupadd nagcmd usermod -G nagcmd nagios usermod -G nagcmd www-data
5.编译安装Nagios ./configure –with-command-group=nagcmd make all make install make install-init make install-config make install-commandmode cp sample-config/httpd.conf /etc/apache2/sites-enabled/nagios.conf
6.编译安装Nagios插件 ./configure –with-nagios-user=nagios –with-nagios-group=nagios make make install
7.验证Nagios配置文件,启动 /etc/init.d/nagios start
8.lighttpd配置 htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin #回车后输入2次密码
启用php fastcgi 修改Lighttpd主配置文件,添加nagios支持 server.modules = ( "mod_access", "mod_alias", "mod_cgi", "mod_setenv", "mod_auth", "mod_compress" ) static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".cgi" ) alias.url = ( "/nagios" => "/usr/local/nagios/share/" ) $HTTP["url"] =~ "^/nagios/cgi-bin" { } $HTTP["url"] =~ "^/nagios" { auth.backend.htpasswd.userfile = "/usr/local/nagios/etc/htpasswd.users" auth.require = ( "" => ( "method" => "basic", "realm" => "nagios", "require" => "user=nagiosadmin" ) ) setenv.add-environment = ( "REMOTE_USER" => "user" ) }
9.安装配置nagiosql mv nagiosql3 /www/web/nagadmin chown -R www-data:www-data /www/web/nagadmin/ cd /www/web/nagadmin/install touch ENABLE_INSTALLER http://gaojinbo.com/nagadmin 安装sample数据 |
|
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |