您的位置:首页 > 移动开发 > IOS开发

nagios 安装

2013-12-19 17:31 218 查看
nagios部署1、安装必要包:

yuminstall gd gd-devel openssl glibc-common httpd php gcc* net-snmp-*

tar vxf nagios-4.0.2.tar.gz
useradd -g wheel -G apache nagios
cd nagios-4.0.2
2、nagios安装
./configure --with-nagios-user=nagios--with-nagios-group=apache --with-command-user=nagios--with-command-group=apache --prefix=/usr/local/nagios
Echo $?
0
make all
make install
make install-init
make install-commandmode
make install-config
make install-webconf

3、nagios-plugins安装
tar zxf nagios-plugins-1.5.tar.gz
cd nagios-plugins-1.5
./configure--prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=apache--enable-openssl --enable-perl-modules
Echo $?
0
make&& make install

4、将nagios添加到开机启动中
chkconfig --add nagios
chkconfig nagios on

5、检查安装是否有问题
/usr/local/nagios/bin/nagios-v /usr/local/nagios/etc/nagios.cfg
双0代表没有问题。

6、启动nagios和apache
servicenagios start
servicehttpd start

7、检查nagios进程
ps -ef| grep nagios

8、设置nagios登陆密码
htpasswd -c /usr/local/nagios/etc/htpasswd.usersnagiosadmin

9、关闭selinux
Vi /etc/sysconfig/selinux

10、开放iptables 80 端口
Vi /etc/sysconfig/iptables
黏贴下述命令至倒数第三行:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp--dport 80 -j ACCEPT

11、重启计算机
Init6

本文出自 “ItFans.520” 博客,请务必保留此出处http://51you.blog.51cto.com/3561752/1342885
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: