安装Nagios

0. 安装Apache
yum install httpd
chkconfig httpd on
1. 安装PHP和其他
yum install php
yum install gcc glibc glibc-common
yum install gd gd-devel
2. 创建账户
/usr/sbin/useradd -m nagios
passwd nagios
/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -a -G nagcmd nagios
/usr/sbin/usermod -a -G nagcmd apache
3. 下载安装包
两个安装包:nagios-3.3.1.tar.gz nagios-plugins-1.4.15.tar.gz
4. 开始安装
4.1. 主程序
tar xzf nagios-3.3.1.tar.gz
cd nagios
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
vi /usr/local/nagios/etc/objects/contacts.cfg 如果需要自定义配置nagios
make install-webconf
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
service httpd restart
4.2. 插件
tar xzf nagios-plugins-1.4.15.tar.gz
cd nagios-plugins-1.4.15
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
5. 配置nagios自动启动
chkconfig --add nagios
chkconfig nagios on
6. 启动nagios
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
service nagios start
7. 登陆nagios
http://localhost/nagios/ 账户密码:nagiosadmin/你的密码
8. 关于中文本地化
http://sourceforge.net/projects/nagios-cn/
-The End-








你可能感兴趣的:(nagios)