引用http://www.icanwen.cn/article.asp?id=12
作者:icanwen 日期:2009-10-05
一.安装环境:
操作系统:centos5.3
apache的安装:yum install httpd
gcc编译器安装:yum install gcc glibc glibc-common
安装gd库 yum install gd gd-devel
二.nagios安装
useradd -m nagios 添加一个nagios用户
passwd nagios 添加密码
groupadd nagcmd 添加nagcmd组
usermod -a -G nagcmd nagios 把nagios 加入nagcmd组
usermod -a -G nagcmd apache 把apache 加入nagcmd组
tar xvzf nagios-3.0.6.tar.gz
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
service httpd restart
nagios插件的安装
tar xvzf nagios-plugins-1.4.13.tar.gz
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make && make install
chkconfig --add nagios 添加nagios开机启动
chkconfig nagios on
/usr/local/nagios/bin/nagios –v /usr/local/nagios/etc/nagios.cfg 验证配置文件
service nagios start
web登陆:
http://ip/nagios 登陆nagios web界面