您当前的位置: 首页 > 学无止境 > 心得笔记 网站首页心得笔记
企业级监控系列之五——Nagios基础和入门配置
发布时间:2019-08-03 19:33:24编辑:雪饮阅读()
安装nagios
依赖
[root@localhost src]# yum install httpd php mysql-devel php-mysql
用户、组
[root@localhost src]# groupadd nagcmd
[root@localhost src]# useradd -G nagcmd nagios
将apache添加到nagcmd组中
[root@localhost src]# usermod -a -G nagcmd apache
安装nagios
tar -zxvf nagios-3.3.1.tar.gz
[root@localhost nagios]# ./configure --sysconfdir=/etc/nagios --with-command-group=nagcmd --enable-event-broker
[root@localhost nagios]# make all
[root@localhost nagios]# make install
[root@localhost nagios]# make install-init
[root@localhost nagios]# make install-commandmode
[root@localhost nagios]# make install-config
[root@localhost nagios]# make install-webconf
认证配置
[root@localhost nagios]# htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
New password:
Re-type new password:
Adding password for user nagiosadmin
安装插件
tar -zxvf nagios-plugins-1.4.15.tar.gz
[root@localhost nagios-plugins-1.4.15]# ./configure --with-nagios-user=nagios --with-nagios-group=nagios
[root@localhost nagios-plugins-1.4.15]# make
[root@localhost nagios-plugins-1.4.15]# make install
处理selinux
setenforce 0
服务
[root@localhost nagios-plugins-1.4.15]# service httpd start
Starting httpd: [ OK ]
[root@localhost nagios-plugins-1.4.15]# chkconfig --add nagios
[root@localhost nagios-plugins-1.4.15]# chkconfig nagios on
[root@localhost nagios-plugins-1.4.15]# service nagios start
Starting nagios: done.
webapi
关键字词:nagios,监控