快速业务通道

linux lighttpd nagiosQL

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-09

通过nagiosQL管理nagios非常方便,简单

1.环境:


ubuntu 9.04 x86_64
nagios 3.2.1
nagios-plugins 1.4.14
lighttpd 1.4.19

2.下载地址
http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.1.tar.gz
http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.14.tar.gz

web admins
http://downloads.sourceforge.net/project/nagiosql/nagiosql/NagiosQL 3.0.3/nagiosql303.zip?use_mirror=nchc

3.安装依赖包
apt-get install build-essential lighttpd php5-cgi php5-cli php5-curl php5-gd php5-mysql php-html-template-it unzip

4.添加相关用户


useradd nagios

passwd nagios

usermod -G nagios nagios

groupadd nagcmd

usermod -G nagcmd nagios

usermod -G nagcmd www-data

5.编译安装Nagios

tar xvzf nagios-3.2.1.tar.gz

./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插件

tar xvzf nagios-plugins-1.4.14.tar.gz

./configure –with-nagios-user=nagios –with-nagios-group=nagios

make

make install

7.验证Nagios配置文件,启动

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

/etc/init.d/nagios start

8.lighttpd配置

生成auth key

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin #回车后输入2次密码

Empire CMS,phome.net

启用php fastcgi

lighty-enable-mod fastcgi

修改Lighttpd主配置文件,添加nagios支持

vi /etc/lighttpd/lighttpd.conf

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/cgi-bin" => "/usr/local/nagios/sbin",

"/nagios" => "/usr/local/nagios/share/"

)

$HTTP["url"] =~ "^/nagios/cgi-bin" {

cgi.assign = ( "" => "" )

}

$HTTP["url"] =~ "^/nagios" {

auth.backend = "htpasswd"

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

unzip nagiosql303.zip

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 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号