nagios-4.0.8安装
1、下载nagios-4.0.8、nagios-plugins-2.0.3
创新互联专注于平谷网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供平谷营销型网站建设,平谷网站制作、平谷网页设计、平谷网站官网定制、重庆小程序开发公司服务,打造平谷网络公司原创品牌,更为您提供平谷网站排名全网营销落地服务。
wget http://jaist.dl.sourceforge.net/project/nagios/nagios-4.x/nagios-4.0.8/nagios-4.0.8.tar.gz
wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
2、安装组件
yum install -y wget httpd php gcc glibc glibc-common gd gd-devel make net-snmp
3、创建nagios用户与用户组
useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
4、安装nagios-4.0.8
tar zxvf nagios-4.0.8.tar.gz
cd nagios-4.0.8
./configure --prefix=/usr/local/nagios --with-command-group=nagcmd --with-nagios-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
chown -R nagios:nagcmd /usr/local/nagios/libexec/eventhandlers
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
service nagios start
5、配置httpd
1)配置web登陆用户名和密码
htpasswd -c /usr/local/nagios/etc/htpasswd nagiosadmin
vi /etc/httpd/conf/httpd.conf 加入以下内容
2)找到
user apache
group apache
修改为
user nagios
group nagcmd
3)找到
#ServerName www.example.com:80
将前面的#删除
6、安装nagios-plugins
tar zxvf nagios-plugins-2.0.3.tar.gz
cd nagios-plugins-2.0.3
./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagcmd --with-command-user=nagios --with-command-group=nagcmd
make
make install
7、设置开机启动
chkconfig nagios on
service nagios start
chkconfig httpd on
service httpd start
8、访问
http://IP/nagios 输入用户名密码
nagiosadmin:$apr1$CZJUFBRq$TBWA4x8B6nbH0nA4ekHg7. http://tool.oschina.net/htpasswd
网页标题:nagios-4.0.8安装
文章网址:http://ybzwz.com/article/gsgsig.html