Contents
# useradd nagios
# grep nagios /etc/passwd /etc/group /etc/passwd:nagios:x:1001:1001::/home/nagios:/bin/sh /etc/group:nagios:x:1001:
# groupadd nagcmd # usermod -G nagcmd nagios
# grep '^User ' /usr/local/apache2/conf/httpd.conf|cut -d' ' -f2 apache # usermod -G nagcmd apache
mkdir -pv /usr/local/nagios chown -R nagios.nagios /usr/local/nagios
wget -c http://heanet.dl.sourceforge.net/sourceforge/nagios/nagios-2.10.tar.gz tar zxfv nagios-2.10.tar.gz cd nagios-2.10
./configure make all make install make install-init make install-commandmode make install-config
# cd /usr/local/nagios/etc/ # for i in `ls` ; do mv $i `echo $i | cut -d'-' -f1` ; done
# wget -c http://heanet.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.10.tar.gz # tar zxvf nagios-plugins-1.4.10.tar.gz
# cd nagios-plugins-1.4.10 # ./configure LDFLAGS=-ldl # make # make install
# /etc/init.d/nagios start
# cat > /usr/local/apache2/conf/nagios.conf << EOF ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin <Directory "/usr/local/nagios/sbin"> Options ExecCGI AllowOverride None Order allow,deny Allow from all AuthName "Nagios Access" AuthType Basic AuthUserFile /usr/local/nagios/etc/htpasswd.users Require valid-user </Directory> Alias /nagios /usr/local/nagios/share <Directory "/usr/local/nagios/share"> Options None AllowOverride None Order allow,deny Allow from all AuthName "Nagios Access" AuthType Basic AuthUserFile /usr/local/nagios/etc/htpasswd.users Require valid-user </Directory> EOF
# echo Include conf/nagios.conf >> /usr/local/apache2/conf/httpd.conf
# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin New password: ****** Re-type new password: ****** Adding password for user nagiosadmin
# vim /usr/local/nagios/etc/cgi.cfg [ edit ] use_authentication=1 authorized_for_system_information=nagiosadmin authorized_for_configuration_information=nagiosadmin authorized_for_system_commands=nagiosadmin authorized_for_all_services=nagiosadmin authorized_for_all_hosts=nagiosadmin authorized_for_all_service_commands=nagiosadmin authorized_for_all_host_commands=nagiosadmin # /etc/init.d/nagios restart
/usr/local/apache2/bin/httpd -k restart lynx http://localhost/nagios username: nagiosadmin password: **********
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg /etc/init.d/nagios start ps -ef | grep nagios lynx http://localhost/nagios
$ wget -c http://belnet.dl.sourceforge.net/sourceforge/fruity/fruity-1.0-rc2.tar.gz $ tar zxvf fruity-1.0-rc2.tar.gz $ cd fruity-1.0-rc2