AI智能
改变未来

nagios监控安装部署

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.htmlcat /etc/httpd/conf/httpd.conf | grep -w \"AddType application/x-httpd-php .php\"AddType application/x-httpd-php .phpcat /var/www/html/index.php<?phpphpinfo();?>systemctl start httpdip地址访问是否正常

3、创建组和用户

groupadd nagiosuseradd -g nagios nagios

4、解压编译安装

cd nagios-4.2.1/./configure --prefix=/usr/local/nagiosmake allmake installmake install-initmake install-configmake install-webconfmake install-commandmode

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

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

6、启动nagios和apache

service httpd  restartservice nagios restart

7、安装Nagios-plugins插件

tar zxf nagios-plugins-2.1.2.tar.gzcd nagios-plugins-2.1.2/./configure --prefix=/usr/local/nagiosmakemake install
赞(0) 打赏
未经允许不得转载:爱站程序员基地 » nagios监控安装部署