.bove output sho/s that required packages are installed on system. 0n the case the are not installed you can install them using your Cent12 ). 343. 0f you /ant to install from Cent12 ). 343 you need to enable Cent12- 5edia.repo 6nabling Cent12-5edia.repo vim 7etc7yum.repos.d7Cent12-5edia.repo # Cent12-5edia.repo # # 8his repo is used to mount the default locations for a C3915 7 343 on # Cent12-). :ou can use this repo and yum to install items directly o; the # 343 021 that /e release. # # 8o use this repo< put in your 343 and use it /ith the other repos too& # yum --enablerepo=c)-media >command? # or for 1@A: the media repo< do this& # # yum --disablerepo=BC --enablerepo=c)-media >command? >c)-media? name=Cent12-Dreleasever - 5edia baseurl=Ele&777media7dvd7 Ele&777media7Cent127 Ele&777media7cdrom7 Ele&777media7cdrecorder7 gpgcheck=1 enabled=1 gpgkey=Ele&777etc7pki7rpm-gpg79P5-FPF-G6:-Cent12-)
2tep # ' 0nstalling Prerequisites.
yum --disablerepo=BC --enablerepo=c)-media -y install httpd gcc glibc glibc- common gd gd-devel 2tep # Creating Hsers7Froups needed. groupadd nagcmd useradd -F nagcmd<apache nagios id nagios pass/d nagios 2tep # ! 3o/nloading @agios I Plugins mkdir 7do/nloads cd 7do/nloads /get -c http&77prdo/nloads.sourceforge.net7sourceforge7nagios7nagios- .1.'.tar.gJ /get -c http&77prdo/nloads.sourceforge.net7sourceforge7nagiosplug7nagios- plugins-1.!.1.tar.gJ 2tep # ) 6-tracting @agios tar ball. tar J-vf nagios-.1.'.tar.gJ cd nagios-.1.' 2tep # # running .7conEgure script. .7conEgure --/ith-command-group=nagcmd 2tep # % compiling the source code. make all 2tep # " 0nstalling @agios binaries. make install 2tep # ( 0nstalling init script. make install-init 2tep # 1+ 0nstalling sample conEg Eles. make install-conEg 2tep # 11 setting permissions on the e-ternal command directory. make install-commandmode
2tep # 1' Hpdating contacts7groups information in contacts.cfg Ele. vim 7usr7local7nagios7etc7ob*ects7contacts.cfg change email address of nagiosadmin user line ) according to your requirements. 2tep # 1 0nstalling /eb conEguration. make install-/ebconf 2tep # 1! creating nagiosadmin user and setting pass/ord for /eb- interface. htpass/d -c 7usr7local7nagios7etc7htpass/d.users nagiosadmin 2tep # 1) ConEguring< 9estarting .pache 2ervice and .dding to runlevel ) . vim 7etc7httpd7conf7httpd.conf go to line (1 and add inde-.php chkconEg --level ) httpd on service httpd restart 2tep # 1# Compiling and installing @agios plugins. cd 7do/nloads7 tar J-vf nagios-plugins-1.!.1.tar.gJ cd nagios-plugins-1.!.1 .7conEgure --/ith-nagios-user=nagios --/ith-nagios-group=nagios make make install 2tep # 1% 4erifying< restarting nagios service and .dding to runlevel ) . 7usr7local7nagios7bin7nagios -v 7usr7local7nagios7etc7nagios.cfg chkconEg --level ) nagios on Changing nagios user home directory to 7usr7local7nagios usermod -d 7usr7local7nagios7 nagios service nagios restart ps au- | grep nagios 2tep # 1" 5odifying 2eAinu- 2etting for @agios chcon -9 -t httpd,sys,content,t 7usr7local7nagios7sbin7 chcon -9 -t httpd,sys,content,t 7usr7local7nagios7share7 2tep # 1( Aogin to Keb-0nterface. Lttp&77localhost7nagios 2tep # '+ Check for @agios Aogs tail -f 7usr7local7nagios7var7nagios.log