Okay, here i post a tutorial on how to install this. software requirement are as follows : -CentOS 5.2 (linux base operating system)
-stable internet connection to install nagios & centOS plug-ins.
How to install CentOS 5.2?
-go to this url: http://www.howtoforge.com/perfect-server-centos-5.2-ispconfig-3
(i prefer to boot dual OS [wixdows xp+linux] - put your linux onthe other partition).
-burn iso image into a dvd n bootform dvd. iso image are available here [url]: http://isoredirect.centos.org/centos/5/isos/i386/
Installation of Nagios 3.0
Installyumplug-ins & yumex. Install some recommended packages to prevent problems with packages (broken/3rd party) and kernel-modules (root privileges needed):
type this to become root admin then type this command to install yum plug-in:
su -l
yum install yumex yum-fastestmirror yum-skip-broken yum-kmod yum-kernel-module yum-priorities.
RPMforge
The RPMforge-repository provides many packages like multimedia applications and drivers. Install the repository:
rpm -ivh http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
wget -c http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uvh oscc-repos2-0.0.1-1.noarch.rpm
Nagios installation command
These are the command that need to be execute at the linux terminal and need to be compile to setting up the system from start. Execution is a must or the system will not appear in the web browser.
echo “***** Starting Nagios Quick-Install: ” `date`
echo “***** Installing pre-requisites”
echo “***** Installing WGET so we could download the packages that we need”
yum -y install wget
echo “***** WGET has been installed”
# Installing Packages For Centos echo “***** Installing very Important packages otherwise out Nagios wont work”
yum -y install make make autoconf httpd php-snmp.i386 php-pear.noarch php-pear-File.noarch php-rrdtool.i386 php-xml.i386 php-mcrypt.i386 php-mysql.i386 php-ncurses.i386 php-devel.i386 php-gd.i386 php-jpgraph.noarch php-common
yum -y install gcc g++ flex byacc
yum -y install glibc glibc-common
yum -y install gd gd-devel
yum -y install perl
# Adding user nagios
echo “***** Setting up the environment”
useradd -m nagios echo “YOUR_DESIRED_PASSWORD”
passwd --stdin nagios groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache
# Getting Nagios Source Tarball with Plugins
echo “***** Getting the Nagios Source and Plug-Ins”
cd /usr/local/src
wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.6.tar.gz
wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.13.tar.gz
tar xzf nagios-3.0.6.tar.gz
tar xzf nagios-plugins-1.4.13.tar.gz
# Compiling and Nagios Installation echo “***** Installing Nagios”
cd /usr/local/src/nagios-3.0.6
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
# Setting up Password for Web authentification
echo “***** Setting up htpasswd auth”
htpasswd -nb nagiosadmin yourpassword > /usr/local/nagios/etc/htpasswd.users
service httpd restart
# Installing Nagios Plugins if fail do make clean
echo “***** Setting up Nagios Plug-Ins”
cd /usr/local/src/nagios-plugins-1.4.13
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
# Seting up SELinux
echo “***** Fixing SELinux”
chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/
chcon -R -t httpd_sys_content_t /usr/local/nagios/share/
echo “***** Starting Nagios”
This command should be apply every times after your computer has been reboot or the system could not be opened.
chkconfig --add nagios
chkconfig nagios on
service nagios start
service iptables stop
Nagios web browser:
Open this url to view your system. You will see this interface on the first page you open.
Thats all for now.
to be continued in part 2.
the configuration part.



E.N.J.O.Y!!







