




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
【移動應(yīng)用開發(fā)技術(shù)】InstallationinstructionsofNagiosonCentOS6.464bit
#InstallationinstructionsofNagiosonCentOS6.464bit
Author:LarryZhao
Q
Q:920057952
BLOG:
E-mail:zhaolong0508@126.com
#
NTPService
yuminstallntp
servicentpdstart
chkconfigntpdon
crontab-e
*****/usr/sbin/ntpdate
#PacketsPrepare
nagios-3.3.1.tar.gznagios-plugins-1.4.15.tar.gz
nrpe-2.12.tar.gz
rrdtool-1.4.7.tar.gz
pnp4nagios-0.6.6.tar.gz
#WeuseX-shelltouploadthesefilestoourserver
mkdir/upload;cd/upload
#########################NagiosServer45######################################
tarzxvfnagios-3.3.1.tar.gz
tarzxvfnagios-plugins-1.4.15.tar.gz
tarzxvfnrpe-2.12.tar.gz
tarzxvfrrdtool-1.4.7.tar.gz
tarzxvfpnp4nagios-0.6.6.tar.gz
rm-f*.gz
#EnvironmentPrepare
yuminstall-ynet-snmpnet-snmp-utilshttpdgccglibcglibc-common*gd*phpphp-mysqlmysqlmysql-servermysql-developenssl-devel
yuminstall-ylibpangocairopangopango-develcairocairo-develredhat-lsb-graphicspkgconfiggroffglibglib-devellibart*gettextgettext-devellibxml2libxml2-devel
yuminstall-yfreetypefreetype-devellibpnglibpng-devellibjpeglibjpeg-devel
libiconvlibiconv-devel
qpixmanqpixman-devel
#SELINUX
vim/etc/selinux/config
SELINUX=disabled
#IPTABLES
serviceiptablesstop
chkconfigiptablesoff
#InstallNagios
groupaddnagcmd
useradd-mnagios
usermod-a-Gnagcmdnagios
usermod-a-Gnagcmdapache
cdnagios
./configure--with-command-group=nagcmd--enable-event-broker
makeall&&makeinstall&&makeinstall-init&&makeinstall-config&&makeinstall-commandmode&&makeinstall-webconf
htpasswd-c/usr/local/nagios/etc/htpasswd.usersnagiosadmin
#typenewpasswordtwice
Hereweusenagiosasourpassword
servicehttpdstart
chkconfighttpdon
cd../nagios-plugins-1.4.15/
./configure--with-nagios-user=nagios--with-nagios-group=nagios--with-mysql
make&&makeinstall
chkconfig--addnagios
chkconfignagioson
vim/etc/profile
#Insert"PATH=$PATH:/usr/local/nagios/bin"into/etc/profile
PATH=$PATH:/usr/local/nagios/bin
#saveandexit
./etc/profile
nagios-v/usr/local/nagios/etc/nagios.cfg
servicenagiosstart
#Nowifyouwantaccessyournagiosserver,http://ip/nagios.Username:nagiosadminPassword:nagios
cd../nrpe-2.12/
./configure--enable-ssl--with-ssl-lib=/lib/
makeall&&makeinstall-plugin
#Itisnecessarytoinsertsomelinesofcodeinto/usr/local/nagios/etc/objects/commands.cfg
vim/usr/local/nagios/etc/objects/commands.cfg
#checknrpe
definecommand{
command_namecheck_nrpe
command_line$USER1$/check_nrpe-H$HOSTADDRESS$-c$ARG1$
}
#saveandexit
#Wecanusethecommand_linebelowtocheckourconfigfiles
/usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/nagios.cfg
cd../rrdtool-1.4.7
./configure--prefix=/usr/local/rrdtool
make&&makeinstall
cd../pnp4nagios-0.6.6
chownnagios.nagios*
chmod+x*
./configure--prefix=/usr/local/pnp4nagios--with-nagios-user=nagios--with-nagios-group=nagios--with-rrdtool=/usr/local/rrdtool/bin/rrdtool
makeall
makeinstall
makeinstall-webconf
makeinstall-config
makeinstall-init
cd/usr/local/pnp4nagios/etc/
mvmisccommands.cfg-samplemisccommands.cfg
mvnagios.cfg-samplenagios.cfg
mvrra.cfg-samplerra.cfg
mvnpcd.cfg-samplenpcd.cfg
mvprocess_perfdata.cfg-sampleprocess_perfdata.cfg
cdpages/
mvweb_traffic.cfg-sampleweb_traffic.cfg
cd../check_commands/
mvcheck_all_local_disks.cfg-sample
check_all_local_disks.cfg
mvcheck_nrpe.cfg-sample
check_nrpe.cfg
mvcheck_nwstat.cfg-sample
check_nwstat.cfg
servicenpcdrestart
#Nagiosconfigfiles
vim/usr/local/nagios/etc/nagios.cfg
process_performance_data=1
host_perfdata_command=process-host-perfdata
service_perfdata_command=process-service-perfdata
vim/usr/local/nagios/etc/objects/commands.cfg
#'process-host-perfdata'commanddefinition
definecommand{
command_name
process-host-perfdata
command_line
/usr/local/pnp4nagios/libexec/process_perfdata.pl
}
#'process-service-perfdata'commanddefinition
definecommand{
command_name
process-service-perfdata
command_line
/usr/local/pnp4nagios/libexec/process_perfdata.pl
}
command_name
process-service-perfdata
command_line
/usr/local/nagios/libexec/process_perfdata.pl
}
vim/usr/local/nagios/etc/objects/templates.cfg
definehost{
name
host-pnp
action_url
/pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_'class='tips'rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=_HOST_
register
0
}
defineservice{
name
srv-pnp
action_url
/pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$'class='tips'rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
register
0
}
cp/upload/pnp4nagios-0.6.6/contrib/ssi/*/usr/local/nagios/share/ssi/
cd/usr/local/pnp4nagios/share/
mvinstall.phpinstall.php.bak
#checknpcd.cfg
/usr/local/pnp4nagios/bin/npcd-d-f/usr/local/pnp4nagios/etc/npcd.cfg
#Firsttimetoaccess
http://ip/php4nagios
#createsomeconfigfilesaswelike
cd/usr/local/nagios/etc/objects/
touchmylinux.cfg;vimmylinux.cfg
definehost{
use
linux-server,host-pnp
host_name
puppet
alias
puppty_jd_server
address
48
}
defineserviceextinfo{
host_name
puppet
service_description
check_load
action_url
/pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$'class='tips'rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
}
defineservice{
use
generic-service,srv-pnp
host_name
puppet
service_description
check_local_load
check_command
check_nrpe!check_load
}
defineservice{
use
generic-service,srv-pnp
host_name
puppet
service_description
check_users
check_command
check_nrpe!check_users
}
vim../nagios.cfg
#cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
cfg_file=/usr/local/nagios/etc/objects/mylinux.cfg
servicenagiosrestart
servicenpcdrestart
servicehttpdrestart
############################NagiosClient48###################################
#
NTPService
yuminstallntp
servicentpdstart
chkconfigntpdon
crontab-e
*****/usr/sbin/ntpdate
#PacketsPrepare
nagios-plugins-1.4.15.tar.gz
nrpe-2.12.tar.gz
#WeuseX-shelltouploadthesefilestoourserver
mkdir/upload;cd/upload
tarzxvfnagios-plugins-1.4.15.tar.gz
tarzxvfnrpe-2.12.tar.gz
rm-f*.gz
#EnvironmentPrepare
yum-yinstallnet-snmpnet-snmp-utilsopenssl-develgccglibcglibc-common*gd*
#SELINUX
vim/etc/selinux/config
SELINUX=disabled
#IPTABLES
serviceiptablesstop
chkconfigiptablesoff
useraddnagios
cdnagios-plugins-1.4.15
./configure--with-nagios-user=nagios--with-nagios-group=nagios
make&&makeinstall
cd../nrpe-2.12
./configure--enable-ssl--with-ssl-lib=/usr/lib/
makeall
makeinstall-plugin&&makeinstall-daemon&&makeinstall-daemon-config
chown-Rnagios:nagios/usr/local/nagios
cp/usr/local/nagios/etc/nrpe.cfg/etc/nrpe.cfg
#allowed_hostschangetothenagiosserver'sIPaddress
vim/etc/nrpe.cfg
allowed_hosts=45
#Threelinesneedtochange,youcanusesetnutofindthem
vim/etc/snmp/snmpd.conf
line41com2secnotConfigUser
default
larryzhao
line62access
notConfigGroup""
any
noauth
exact
mib2nonenone
line89viewmib2
included
.ernet.mgmt.mib-2fc
servicesnmpdrestart
chkconfigsnmpdon
#Startnrpeservice
/usr/local/nagios/bin/nrpe-c/etc/nrpe.cfg-d
#Tochecknrpeworkstatus
ps-ef|grepnrpe
#addnrpetorc.local
vim/etc/rc.d/rc.local
/usr/local/nagios/bin/nrpe-c/etc/nrpe.cfg-d
###############################E-mailNotice##########################################
yuminstall-ysendmail
yuminstall-ysendmail-cf
m4/etc/mail/sendmail.mc>/etc/mail/sendmail.cf
vi/etc/mail/local-host-names
vi/etc/mail/submit.cf
find#Dj$w.Foo.COM
D
servicesendmailrestart
vim/usr/local/nagios/etc/objects/contacts.cfg
definecontact{
contact_name
nagiosadmin
use
generic-contact
alias
NagiosAdmin
zhaolong0508@126.com,920057952@
}
vim/usr/local/nagios/etc/object
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- T-ZSM 0055-2024“領(lǐng)跑者”評價(jià)技術(shù)要求 燒結(jié)釹鐵硼永磁材料
- 2025年度資質(zhì)借用與投標(biāo)環(huán)境保護(hù)合作協(xié)議
- 二零二五年度智能交通管理系統(tǒng)單方解除合同
- 2025年度跨海大橋旋挖灌注樁施工合同
- 二零二五年度防盜門市場調(diào)研與采購合作協(xié)議
- 二零二五年度生物技術(shù)專利申請合作協(xié)議
- 二零二五年度體育健身公司聘用兼職教練合同書
- 二零二五年度勞務(wù)派遣公司勞動合同范本(含合同解除與賠償)
- 四川省2025年度房屋租賃租賃合同解除與終止合同
- 二零二五年度消費(fèi)金融貸款連帶保證合同書
- 教育的減法讓孩子更幸福(課件)-小學(xué)生教育主題班會通用版
- 大格子作文紙模板
- 中考物理一輪復(fù)習(xí)策略與方法
- 祥云財(cái)富工業(yè)園區(qū)新建鐵路專用線工程環(huán)評報(bào)告
- 藥店換證材料
- 移動商務(wù)基礎(chǔ)(吳洪貴)課件 第二章 探秘移動技術(shù)
- 動畫劇本創(chuàng)作課件
- 痘痘肌膚的各種類型
- (完整版)設(shè)計(jì)管理
- 中國嚴(yán)重膿毒癥膿毒性休克治療指南2023年
- 材料性能學(xué)(第2版)付華課件0-緒論-材料性能學(xué)
評論
0/150
提交評論