溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

搭建nagios監(jiān)控

發(fā)布時間:2020-07-03 18:42:13 來源:網(wǎng)絡(luò) 閱讀:303 作者:xinerwener 欄目:移動開發(fā)

[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

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI