nagios_install.md 786 Bytes

nagios安装和配置

nagios安装及配置

//------------- 安装nagios及配置 ------------//
// 安装epel-release
yum -y install epel-release
// 产看是否安装了nagios
rpm -qa | grep nagios
// 安装nagios
yum install nagios* nrpe
// 启动服务,设置开机自启
systemctl enable nagios
systemctl start nagios
// 设置nagios后台管理员密码
htpasswd -bc /etc/nagios/passwd nagiosadmin nagiosadmin2jsp
用户名建议使用默认的nagiosadmin,否则需要修改/etc/nagios/cgi.cfg文件,替换nagiosadmin到自定义用户名

//------------- 安装nagios客户端nrpe -----------//
// 安装epel-release
yum -y install epel-release
// 查看是否安装了nrpe
rpm -qa | grep nrpe
// 安装nrpe和nagions-plugins
yum install nrpe nagios-plugins*