Centos 5.6下安装Nagios监控平台
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 (编辑:应用网_丽江站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |