- 论坛徽章:
- 0
|
我做的,可以使用的~
所需要的软件:
Nagios:http://prdownloads.sourceforge.n ... gz?use_mirror=jaist
Nagios-Plugins:http://prdownloads.sourceforge.n ... gz?use_mirror=jaist
APACHE:http://httpd.apache.org/download.cgi
添加Nagios的用户:
# useradd -u 31000 -c "Nagios Monitor System" -d /home/nagios nagios
安装nagios以及插件:
# tar zxf nagios-2.5.tar.gz
# cd nagios-2.5
# ./configure --with-cgiurl=/cgi-bin --with-htmurl=nagios
# make all
# make install
# make install-init
# install-commandmode
# install-config
# tar zxf nagios-plugins-1.4.3.tar.gz
# cd nagios-plugins-1.4.3
# ./configure
# make
# make install
# tar zxf apache_1.3.37.tar.gz
# cd apache_1.3.37
# ./configure --prefix=/usr/local --logfiledir=/var/log/httpd --sysconfdir=/usr/local/etc/apache
# make
# make install
# ln -s /usr/local/bin/apachectl /etc/rc.d/init.d/httpd
# /etc/rc.d/init.d/httpd start
# /usr/local/nagios/bin/nagios -v/usr/local/nagios/etc/nagios.cfg
# /etc/rc.d/init.d/nagios start
修改httpd.conf,添加如下
Alias /cgi-bin/nagios/images/ "/usr/local/nagios/share/images/"
<Directory "/usr/local/nagios/share">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /nagios/ "/usr/local/nagios/share/"
<Directory "/usr/local/nagios/share">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "/usr/local/nagios/sbin/"
<Directory "/usr/local/nagios/sbin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
拷贝/usr/local/nagios/etc下所有example文件为cfg文件
修改minimal.cfg,把里面所有定义command的全部注释掉
修改cgi.cfg
修改use_authentication=1为use_authentication=0,即不用验证。
# /etc/rc.d/init.d/httpd restart
之后去访问:
http://x.x.x.x/nagios/
至于配置么~大家多看看啦 |
|