資源描述:
《NagiosCacti基于LNMP(NginxMysqlPHP)搭建實(shí)驗(yàn)報(bào)告》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫(kù)。
1、Nagios+Cacti基于LNMP(Nginx+MysqI+PHP)搭建實(shí)驗(yàn)操作流程搭建環(huán)境CentOS6.2一、Nagios的搭建Nagios組件的運(yùn)行依賴httpd^gcc和gd。檢查nagios所依賴的rpm包是否已經(jīng)安裝:rpm-qhttpdgccglibcglibc-commongdgd-devel安裝一下必要的插件組件foriin、rpm-qgdgd-develgccgcc?c++autoconflibjpeglibjpeg?devellibpnglibpng-develfreetypefreetype-devellibxml2
2、libxml2-develzlibzlib-develglibcglibc-develglib2glib2-develbzip2bzip2-develncursesncurses-develcurlcurl-devele2fsprogse2fsprogs-develkrb5-devellibidnlibidrndevelopensslopenssl-develbisonbison-develreadlinereadline-develIgrep!notinstalled1
3、awk1{print$2}'doyum-yinstall$i;done
4、[root@localhost~]#「pm-qhttpdgccglibcglibc-commongdgd-develhttpd-2.2?15?15?el6?centos.1686packagegccisnotinstalledglibc-2.12-1.47.e!6.i686glibc-common-2.12-1.47.el6.i686packagegdisnotinstalledpackagegd?develisnotinstalled[root@localhost~]#
5、缺少的rpm包,可以掛載光盤(pán)直接使用rpm命令進(jìn)行安裝?;蛲ㄟ^(guò)yum結(jié)
6、合本地源來(lái)實(shí)現(xiàn)rpm包的管理。[root(aiocalhost~]#rpm?qhttpdgccglibcglibc-commongdgd?develhttpd-2.2.15-15.el6.centos.i686gcc-4.4.6-3.el6.i686gIibc-2.12-1.47.el6_2.12.1686glibc-common-2.12-1.47.el6_2.12.i686gd-2.0.35-10.e!6.1686-gd-devel-2.0.35-10.el6.i686[root(aiocalhost~]#
7、添加Nagios運(yùn)行所需要的用
8、戶和組groupaddnagcmduscracld-mnagiosusermod-a-Gnagcmdnagiosusermod-a-Gnagcmdapache#把a(bǔ)pache加入到nagcmd組,便于在通過(guò)webInterface操作nagios時(shí)具有足夠的權(quán)限編譯安裝Nagios,執(zhí)行下列命令安裝Nagiostarzxvfnagios-3.1.2tar.gz#解壓cdnagions-3.1.2#進(jìn)入解壓后的冃錄?/configure--with-command-group=nagcmd#編譯makeall#執(zhí)行安裝makeinstallma
9、keinstal1-initmakeinstall-configmakeinstal1-commandmode為email指定您想用來(lái)接收nagios警告信息的郵件地址,默認(rèn)是本機(jī)的nagios用戶:vim/usr/local/nagios/etc/objects/contacts.cfgemailnagios@localhost#這個(gè)是默認(rèn)設(shè)置makeinstall-webconf創(chuàng)建登錄nagiosweb程序的用戶,該帳號(hào)在以后通過(guò)web登錄nagios認(rèn)證時(shí)所用:htpasswd-c/usr/local/nagios/etc/htpas
10、swd.usersnagiosadmin重啟httpd服務(wù)servicehttpdrestartchkconfighttpdon[root@localhostnagios]#servicehttpdrestart停止httpd:[失敗]正在啟動(dòng)httpd:httpd:Couldnotreliablydeterminetheserver'sfullyqualifieddomainname,usinglocalhost.localdomainforServerName[確定][root@localhostnagios]#
11、編譯、安裝nagios-
12、plugins插件tarzxfnagios-plugins-1.4.13.tar.gzcdnagios-plugins-L13?/configure--with-n