码迷,mamicode.com
首页 > 移动开发 > 详细

nagios监控安装部署

时间:2020-11-12 14:19:15      阅读:17      评论:0      收藏:0      [点我收藏+]

标签:evel   systemctl   插件   pen   监控安装   admin   搭建lamp环境   启动   plugins   

1、搭建LAMP环境并安装所需要的工具和库

 yum -y install httpd php openssl-devel gcc gcc-c++

2、整合Apache和PHP=lamp

 cat /etc/httpd/conf/httpd.conf | grep -v "^#"|grep -w "DirectoryIndex"
    DirectoryIndex index.php index.html
cat /etc/httpd/conf/httpd.conf | grep -w "AddType application/x-httpd-php .php"
    AddType application/x-httpd-php .php

cat /var/www/html/index.php 
<?php
phpinfo();
?>

systemctl start httpd

ip地址访问是否正常

3、创建组和用户

groupadd nagios
useradd -g nagios nagios

4、解压编译安装

cd nagios-4.2.1/
 ./configure --prefix=/usr/local/nagios
 make all
 make install
 make install-init
 make install-config
 make install-webconf
 make install-commandmode

5、生成Nagios网页认证文件并创建用户 用户名最好为:nagiosadmin

htpasswd  -c  /usr/local/nagios/etc/htpasswd.users   nagiosadmin

6、启动nagios和apache

service httpd  restart
service nagios restart

7、安装Nagios-plugins插件

tar zxf nagios-plugins-2.1.2.tar.gz 
cd nagios-plugins-2.1.2/
./configure --prefix=/usr/local/nagios
make
make install

nagios监控安装部署

标签:evel   systemctl   插件   pen   监控安装   admin   搭建lamp环境   启动   plugins   

原文地址:https://blog.51cto.com/14033037/2541829

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!