[iyunv@localhost nagios]# tar zxvf nagios-3.2.0.tar.gz
[iyunv@localhost nagios-3.2.0]# pwd
/root/nagios/nagios-3.2.0
[iyunv@localhost nagios-3.2.0]# ./configure --prefix=/usr/local/nagios/
[iyunv@localhost nagios-3.2.0]# make all && make install
[iyunv@localhost nagios-3.2.0]# make install-init
[iyunv@localhost nagios-3.2.0]# make install-commandmode
[iyunv@localhost nagios-3.2.0]# make install-config
[iyunv@localhost nagios]# tar -zxvf nagios-plugins-1.4.14.tar.gz
[iyunv@localhost nagios]# cd nagios-plugins-1.4.14
[iyunv@localhost nagios-plugins-1.4.14]# ./configure --prefix=/usr/local/nagios/
[iyunv@localhost nagios-plugins-1.4.14]# make && make install
[iyunv@localhost nagios]# tar jxvf nagios-cn-3.2.0.tar.bz2
[iyunv@localhost nagios]# cd nagios-cn-3.2.0
[iyunv@localhost nagios-cn-3.2.0]# ./configure
[iyunv@localhost nagios-cn-3.2.0]# make all && make install
[iyunv@localhost nagios]# tar zxvf httpd-2.2.22.tar.gz
[iyunv@localhost httpd-2.2.22]# mkdir /usr/local/apache2
[iyunv@localhost httpd-2.2.22]# ./configure --prefix=/usr/local/apache2
[iyunv@localhost httpd-2.2.22]# make && make install
[iyunv@localhost nagios]# cd php-5.3.20
[iyunv@localhost php-5.3.20]# mkdir /usr/local/php
[iyunv@localhost php-5.3.20]# ./configure --prefix=/usr/local/php/ --with-apxs2=/usr/local/apache2/bin/apxs
[iyunv@localhost php-5.3.20]# make && make install
User nagios
Group nagios
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
AddType application/x-httpd-php .php
#setting for nagios
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
AuthType Basic
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
AuthType Basic
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd
Require valid-user
</Directory>
[iyunv@localhost conf]# /usr/local/apache2/bin/htpasswd -c /usr/local/nagios/etc/htpasswd yangqing
New password:
Re-type new password:
Adding password for user ixdba