搭建nagios监控

发布时间:2020-07-03 18:42:13 作者:xinerwener
来源:网络 阅读:306

[root@localhost nagios]# tar zxvf nagios-3.2.0.tar.gz
[root@localhost nagios-3.2.0]# pwd
/root/nagios/nagios-3.2.0
[root@localhost nagios-3.2.0]# ./configure --prefix=/usr/local/nagios/
[root@localhost nagios-3.2.0]# make all && make install
[root@localhost nagios-3.2.0]# make install-init
[root@localhost nagios-3.2.0]# make install-commandmode
[root@localhost nagios-3.2.0]# make install-config

[root@localhost nagios]# tar -zxvf nagios-plugins-1.4.14.tar.gz
[root@localhost nagios]# cd nagios-plugins-1.4.14
[root@localhost nagios-plugins-1.4.14]# ./configure --prefix=/usr/local/nagios/
[root@localhost nagios-plugins-1.4.14]# make && make install

[root@localhost nagios]# tar jxvf nagios-cn-3.2.0.tar.bz2
[root@localhost nagios]# cd nagios-cn-3.2.0
[root@localhost nagios-cn-3.2.0]# ./configure
[root@localhost nagios-cn-3.2.0]# make all && make install

[root@localhost nagios]# tar zxvf httpd-2.2.22.tar.gz
[root@localhost httpd-2.2.22]# mkdir /usr/local/apache2
[root@localhost httpd-2.2.22]# ./configure --prefix=/usr/local/apache2
[root@localhost httpd-2.2.22]# make && make install

[root@localhost nagios]# cd php-5.3.20
[root@localhost php-5.3.20]# mkdir /usr/local/php
[root@localhost php-5.3.20]# ./configure --prefix=/usr/local/php/ --with-apxs2=/usr/local/apache2/bin/apxs
[root@localhost php-5.3.20]# make && make install


User nagios
Group nagios
<IfModule dir_module>
   DirectoryIndex index.html index.php
</IfModule>

AddType application/x-httpd-php .php

#setting for nagios
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
       <Directory "/usr/local/nagios/sbin">
       AuthType Basic
       Options ExecCGI
       AllowOverride None
       Order allow,deny
       Allow from all
       AuthName "Nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd
       Require valid-user
       </Directory>

Alias /nagios "/usr/local/nagios/share"
       <Directory "/usr/local/nagios/share">
       AuthType Basic
       Options None
       AllowOverride None
       Order allow,deny
       Allow from all
       AuthName "nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd
       Require valid-user
       </Directory>


[root@localhost conf]# /usr/local/apache2/bin/htpasswd -c /usr/local/nagios/etc/htpasswd yangqing
New password:
Re-type new password:
Adding password for user ixdba

[root@localhost nagios]# /etc/init.d/nagios start

推荐阅读:
  1. nagios 监控自身
  2. 搭建部署nagios监控

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

nagios na

上一篇:vue-cli2.0 与 3 引入方式

下一篇:php 初学

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》