這篇文章主要為大家展示了“nagios如何安裝配置”,內(nèi)容簡而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領(lǐng)大家一起研究并學(xué)習(xí)一下“nagios如何安裝配置”這篇文章吧。

創(chuàng)新互聯(lián)服務(wù)項目包括思茅網(wǎng)站建設(shè)、思茅網(wǎng)站制作、思茅網(wǎng)頁制作以及思茅網(wǎng)絡(luò)營銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢、行業(yè)經(jīng)驗、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,思茅網(wǎng)站推廣取得了明顯的社會效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到思茅省份的部分城市,未來相信會繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!
1安裝前準(zhǔn)備:
Apache2
GCC編譯器與開發(fā)庫
GD庫與開發(fā)庫
php
2創(chuàng)建帳號:
/usr/sbin/useradd nagios --創(chuàng)建帳號組
mkdir /usr/local/nagios --創(chuàng)建安裝目錄
chown nagios:nagios /usr/local/nagios --修改目錄權(quán)限
usermod -G nagios apache --將Web帳號加入nagios組,可以在web操作。
3安裝:
wget http://ncu.dl.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz
tar -zxvf nagios-3.2.3.tar.gz
./configure --prefix=/usr/local/nagios
make all
make install -- This installs the main program, CGIs, and HTML files
make install-init -- This installs the init script in /etc/rc.d/init.d
make install-commandmode -- This installs and configures permissions on the
make install-config -- This installs *SAMPLE* config files in /usr/local/nagios/etc
make install-webconf -- This installs the Apache config file for the Nagios
4.配置文件:
more /etc/httpd/conf.d/nagios.conf
¥¥¥AuthUserFile /usr/local/nagios/etc/htpasswd.users
cp /etc/httpd/conf.d/nagios.conf /var/www/html/
nagios頁面訪問賬號:
/usr/bin/htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
New password: --nagiosadmin 帳號權(quán)限已經(jīng)默認(rèn)設(shè)置了。
Re-type new password: --配置文件看/usr/local/nagios/etc/nagios.cfg
Adding password for user root --重點/usr/local/nagios/etc/cgi.cfg
這里注意: nagiosadmin作為默認(rèn)用戶是用從WEB頁面直接操作CGI功能,換句話說也就可以在頁面中直接進(jìn)行操作,如果需要修改用戶名,那么需要在/usr/local/nagios/etc/cgi.cfg 賦予新永明WEB頁面操作權(quán)限,當(dāng)然一般使用nagios就不建議采用頁面操作。
log日志
touch /usr/local/nagios/var/nagios.log
chown nagios:nagios /usr/local/nagios/var/nagios.log
5.配置開機(jī)啟動:
設(shè)置nagios為開機(jī)啟動
[root@localhostnagios]# chkconfig nagios on
[root@localhostnagios]# service nagios start
[root@localhost soft]# service httpd restart
6.測試
http://192.168.28.X/nagios/
安裝首要插件:nagios-plugins
以上是“nagios如何安裝配置”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!
網(wǎng)頁名稱:nagios如何安裝配置
網(wǎng)頁路徑:http://chinadenli.net/article36/gsgosg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供營銷型網(wǎng)站建設(shè)、用戶體驗、服務(wù)器托管、定制網(wǎng)站、搜索引擎優(yōu)化、面包屑導(dǎo)航
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)