加入收藏 | 设为首页 | 会员中心 | 我要投稿 云计算网_宿迁站长网 (https://www.0527zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

Centos 5.6下安装Nagios监控平台

发布时间:2016-01-21 19:22:45 所属栏目:Linux 来源:网络整理
导读:最近需要对公司内的所有服务器进行监控,当然现在有很多软件可以进行这个功能的实现,比如说微软的SCOM,还有就是今天的Nagios软件了,但是前者还好说Windows

4)Nagions安装

下载Nagions-3.2.3安装包

[root@localhost ~]# wget http://ncu.dl.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz

解压Nagions-3.2.3安装包

[root@localhost ~]# tar -zxvf nagios-3.2.3.tar.gz

安装GCC

注意:不装这个,后边的make all就没办法执行了,会报错的哦~

[root@localhost ~]# cd nagios-3.2.3

[root@localhost ~]# yum instll gcc

[root@localhost ~]# ./configure --prefix=/usr/local/nagios

[root@localhost nagios-3.2.3]# ./configure

为nagions增加用户,此步必需做,否则无法mak all编译

[root@localhost nagios-3.2.3]# useradd nagios

[root@localhost nagios-3.2.3]# mkdir /usr/local/nagios

[root@localhost nagios-3.2.3]# chown nagios.nagios /usr/local/nagios

[root@localhost nagios-3.2.3]# make all

[root@localhost nagios-3.2.3]# make install; make install-init;make install-commandmode;make install-config;make install-webconf

验证程序是否被正确安装

[root@localhost nagios-3.2.3]# cd ~

[root@localhost ~]# cd /usr/local/nagios

[root@localhost nagios]# ls

bin etc libexec sbin share var

如果有上述6个文件,说明就是安装成功了

修改nagios页面文件

[root@localhost nagios]# more /etc/httpd/conf.d/nagios.conf

[root@localhost nagios]# cp /etc/httpd/conf.d/nagios.conf /var/www/html/

生成nagios页面访问账号

[root@localhost nagios]# touch /usr/local/nagios/etc/htpasswd.users

[root@localhost nagios]# /usr/bin/htpasswd -c /usr/local/nagios/etc/htpasswd.users root

New password: (这里输入密码,注意输入内容是不会显示出来的哦)

Re-type new password:(这里再次输入密码,注意输入内容是不会显示出来的哦)

[root@localhost nagios]# cat /usr/local/nagios/etc/htpasswd.users

root:TTiPq0FKlL0iw

修改nagios主配置文件

[root@localhost nagios]# vi /usr/local/nagios/etc/nagios.cfg

(编辑:云计算网_宿迁站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!