欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

nagios用NRPE監(jiān)控Linux主機(jī)服務(wù)端和客戶端的安裝配置-創(chuàng)新互聯(lián)

安裝配置nagios服務(wù)端:

創(chuàng)新互聯(lián)主打移動網(wǎng)站、成都做網(wǎng)站、成都網(wǎng)站設(shè)計(jì)、網(wǎng)站改版、網(wǎng)絡(luò)推廣、網(wǎng)站維護(hù)、域名注冊、等互聯(lián)網(wǎng)信息服務(wù),為各行業(yè)提供服務(wù)。在技術(shù)實(shí)力的保障下,我們?yōu)榭蛻舫兄Z穩(wěn)定,放心的服務(wù),根據(jù)網(wǎng)站的內(nèi)容與功能再決定采用什么樣的設(shè)計(jì)。最后,要實(shí)現(xiàn)符合網(wǎng)站需求的內(nèi)容、功能與設(shè)計(jì),我們還會規(guī)劃穩(wěn)定安全的技術(shù)方案做保障。

安裝前的準(zhǔn)備工作

yum -y install httpd gcc glibc glibc-common gd gd-devel php php-mysql mysql mysql-devel mysql-server
groupadd nagcmd
useradd -G nagcmd nagios
passwd nagios
usermod -a -G nagcmd apache

vim /etc/httpd/conf/httpd.conf

DirectoryIndex index.php index.html index.html.var  #找到這一行,添加index.php

編譯安裝nagios:

wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.5.tar.gz
tar zxf nagios-4.0.5.tar.gz
cd nagios-4.0.5
./configure --with-command-group=nagcmd --enable-event-broker
make all
make install
make install-init
make install-commandmode
make install-config

附:在解壓的時候如果提示下面的錯誤,是因?yàn)橄到y(tǒng)時間不對

tar: nagios-4.0.5/xdata/xsddefault.c: time stamp 2014-04-12 02:37:42 is 250653.223481153 s in the future

tar: nagios-4.0.5/xdata/xsddefault.h: time stamp 2014-04-12 02:37:42 is 250653.223419364 s in the future

tar: nagios-4.0.5/xdata: time stamp 2014-04-12 02:37:42 is 250653.223359922 s in the future

修改系統(tǒng)時間

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

service ntpd stop

ntpdate asia.pool.ntp.org ; hwclock -w

需要在httpd的配置文件目錄(conf.d)中生成Nagios的Web程序配置文件,繼續(xù)在此編譯安裝目錄輸入一條命令:

# make install-webconf

創(chuàng)建一個登錄nagios web程序的用戶,這個用戶帳號在以后通過web登錄nagios認(rèn)證時所用:

# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin #輸入登陸nagios的密碼

# service httpd restart

編譯、安裝nagios-plugins

nagios的所有監(jiān)控工作都是通過插件完成的,因此,在啟動nagios之前還需要為其安裝官方提供的插件。http://exchange.nagios.org/directory/Plugins nagios插件鏈接

wget http://nagios-plugins.org/download/nagios-plugins-2.0.tar.gz
tar zxf nagios-plugins-2.0.tar.gz
cd nagios-plugins-2.0
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install

配置并啟動Nagios

# chkconfig --add nagios

# chkconfig nagios on

檢查其主配置文件

# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

# service nagios start

關(guān)閉selinux,

vim /etc/sysconfig/selinux  將其中的selinux后面的值“force”修改為“disable”或者

臨時性的改動selinux也可以

# setenforce 0
# getenforce
Permissive

或者將nagios的CGI程序運(yùn)行于SELinux/targeted模式而不用關(guān)閉selinux:

# chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin

# chcon -R -t httpd_sys_content_t /usr/local/nagios/share

通過web界面查看nagios:

http://your_nagios_IP/nagios

輸入帳號和密碼

這時候可以看到本機(jī)的服務(wù)狀態(tài),如果沒有出現(xiàn)頁面,請檢查iptables的80端口是否開放

如果出現(xiàn)下面提示,說明是selinux的問題,setenforce 0即可

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

安裝NRPE,服務(wù)端需要自己的check_nrpe,和被監(jiān)控端聯(lián)系

下載頁面

http://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz?r=&ts=1363788540&use_mirror=hivelocity

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。

分享名稱:nagios用NRPE監(jiān)控Linux主機(jī)服務(wù)端和客戶端的安裝配置-創(chuàng)新互聯(lián)
當(dāng)前路徑:http://www.chinadenli.net/article48/iehhp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站制作ChatGPT移動網(wǎng)站建設(shè)小程序開發(fā)網(wǎng)站導(dǎo)航微信小程序

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站建設(shè)網(wǎng)站維護(hù)公司