Centreon+nagios Installation

Source: Internet
Author: User
Tags gpg install php install openssl openssl pear rrd snmp install perl
The environment required for installation of Centreon
1) Install GD Library
Yum Install GD fontconfig-devel libjpeg-devel libpng-devel gd-devel perl-gd
2) Installation Apache2
Yum Install httpd
Usermod-u Apache
3) Install MySQL
Yum install openssl-devel perl-dbd-mysql mysql-server mysql-devel
4) Install PHP and expand
Yum install php php-mysql php-gd php-ldap php-xml
5 Installing Perl and extension modules
Yum Install perl-config-inifiles perl-dbi perl-dbd-mysql
6) Installation Rrdtools
Yum install NTP vim-enhanced gcc gcc-c++ gcc-g77 Flex Bison autoconf automake bzip2-devel ncurses-devel zlib-devel libjpeg -devel libpng-devel libtiff-devel freetype-devel libxpm-devel gettext-devel
Yum install-y rrdtool Perl-rrdtool rrdtool-devel
7) Install SNMP
Yum install perl-crypt-des perl-digest-sha1 perl-digest-hmac net-snmp-utils
Yum install Perl-socket6 Perl-io-socket-inet6 net-snmp net-snmp-libs
Yum install php-snmp Dmidecode lm_sensors PERL-NET-SNMP
8) Install other required libraries
Yum install fping cpp gcc gcc-c++ libstdc++ glib2-devel
9) Install Pear
Yum Install Php-pear
Pear channel-update pear.php.net
Pear Upgrade-all


10) Full Load Installation
Yum-y Install Vixie-cron libjpeg* libpng* freetype* xml-commons* openssl* curl* libxml2-devel.x86_64 e2fsprogs* krb5-deve l* krb5-libs* libr* libidn-devel gcc* mod_dav_svn pcre-devel bzip2* zlib* net-snmp* perl-devel
Yum-y Install httpd httpd-devel mysql-* php-*




















Install Yum Source
SCP ROOT@172.26.159.180:/ROOT/XZY/RPMFORGE-RELEASE-0.5.2-1.EL6.RF.X86_64.RPM/USR/LOCAL/SRC
SCP ROOT@172.26.159.180:/ROOT/XZY/RPM-GPG-KEY.DAG.TXT/USR/LOCAL/SRC
RPM--import/usr/local/src/rpm-gpg-key.dag.txt
rpm-uvh/usr/local/src/rpmforge-release-0.5.2-1.el6.rf.x86_64.rpm


Yum Upgrade system software
Yum Update
Yum Upgrade




Service sshd Restart
Second, server-side service installation
1), Installation Nagios
Useradd Nagios
Groupadd Nagcmd
Usermod-g Nagios,nagcmd Nagios
SCP root@172.26.159.180:/root/xzy/nagios-3.4.1.tar.gz/usr/local/src/nagios-3.4.1.tar.gz
Tar zxf nagios-3.4.1.tar.gz
CD Nagios
./configure--prefix=/usr/local/nagios--with-command-group=nagcmd--enable-nanosleep--enable-event-broker
Make all
Make install
Make Install-init
Make Install-commandmode
Make Install-config
Make install-webconf
Cd.. /


2), Installation Nagios-plugins
SCP root@172.26.159.180:/root/xzy/nagios-plugins-1.4.16.tar.gz/usr/local/src/nagios-plugins-1.4.16.tar.gz
Tar zxf nagios-plugins-1.4.16.tar.gz
CD nagios-plugins-1.4.16
./configure--with-nagios-user=nagios--with-nagios-group=nagios--with-openssl=/usr/bin/openssl-- Enable-perl-modules
Make
Make install
Cd.. /


3), Installation Nrpe
SCP root@172.26.159.180:/root/xzy/nrpe-2.13.tar.gz/usr/local/src/nrpe-2.13.tar.gz
Tar zxf nrpe-2.13.tar.gz
CD nrpe-2.13
./configure--with-nrpe-user=nagios--with-nrpe-group=nagios--with-nagios-user=nagios--with-nagios-group=nagios- -enable-command-args--enable-ssl
Make all
Make Install-plugin
Make Install-daemon
Make Install-daemon-config
Cd.. /
Verifying Nrpe Installation
/usr/local/nagios/libexec/check_load-w 15,10,5-c 30,25,20




4), Installation Ndoutils
SCP root@172.26.159.180:/root/xzy/ndoutils-1.5.2.tar.gz/usr/local/src/ndoutils-1.5.2.tar.gz
Tar zxf ndoutils-1.5.2.tar.gz
CD ndoutils-1.5.2
./configure--prefix=/usr/local/nagios
Make
Make install
CP./config/ndo2db.cfg-sample/usr/local/nagios/etc/ndo2db.cfg
CP./config/ndomod.cfg-sample/usr/local/nagios/etc/ndomod.cfg
CP daemon-init/etc/init.d/ndo2db
Vi/etc/init.d/ndo2db


KILLPROC_NDO2DB ()
{
# #重复两行
Kill ' pidof ndo2db |cut-f1-d ' "' >/dev/null 2>&1
Kill ' pidof ndo2db |cut-f1-d ' "' >/dev/null 2>&1
}


Stop

echo "Stopping $servicename ..."
Killproc_ndo2db

After you save the file, continue to execute the command
chmod +x/etc/init.d/ndo2db
Chkconfig--add ndo2db
Chkconfig--level 345 ndo2db on
Cd.. /


5), Installation Centreon
SCP root@172.26.159.180:/root/xzy/centreon-2.4.4.tar.gz/usr/local/src/centreon-2.4.4.tar.gz
Tar zxf centreon-2.4.4.tar.gz
CD centreon-2.4.4
./install.sh-i


GPL license, fill in Y
Make sure to install Centreon several modules, fill in Y


Centreon etc directory change to/usr/local/centreon/etc
Centreon Variable Library directory change to/usr/local/centreon/var/lib


RRD perl module installed [rrds.pm] change to/USR/LIB64/PERL5/VENDOR_PERL/RRDP.PM
(Can be confirmed by RPM-QL Rrdtool-perl, preferably verified, not necessarily the path above)
PEAR [pear.php] changed to/usr/share/pear/pear.php
(Can be confirmed by RPM-QL Php-pear)




What is the monitoring engine log Directory?==>/usr/local/centreon/log
Default to [/usr/lib/nagios/plugins] ==>/usr/local/nagios/libexec


What is the monitoring engine INIT.D script?
>/etc/init.d/nagios


What is the monitoring engine binary?
>/usr/local/nagios/bin/nagios


What is the monitoring engine configuration directory?
>/usr/local/nagios/etc


Where is the configuration directory for broker module?
>/usr/local/nagios/etc


Where is the init script for broker module Daemon?
>/etc/init.d/ndo2db


Fill in Related projects
NDO ndomod binary changed to/USR/LOCAL/NAGIOS/BIN/NDOMOD.O


Centreon Run Dir directory changed to/usr/local/centreon/var/run
Centstorage RRD directory changed to/usr/local/centreon/var/lib
Centplugins Lib directory changed to/usr/local/centreon/var/lib/centplugins



6), Start related services
Cd.. /
/ETC/INIT.D/HTTPD start
/etc/init.d/mysqld start
mysqladmin-u root password ' _y-93ie2 '
/etc/init.d/ndo2db start


7), web Interface installation
Browser input: http://172.27.206.7/centreon/
Follow the prompts to complete the setup. Finally, you can login to the interface.




8) Start related services
/etc/init.d/nagios start
/etc/init.d/ndo2db restart
/etc/init.d/centcore start
/etc/init.d/centstorage start
/usr/local/nagios/bin/nrpe-c/usr/local/nagios/etc/nrpe.cfg-d




/usr/lib/bin/ndo2db-3x-c/usr/local/nagios/etc/ndo2db.cfg






Second, the Client Service installation (add a Nagios acquisition server)


1), Installation Nagios
Useradd Nagios
Groupadd Nagcmd
Usermod-g Nagios,nagcmd Nagios
SCP root@172.26.159.180:/root/xzy/nagios-3.4.1.tar.gz/usr/local/src/nagios-3.4.1.tar.gz
Tar zxf nagios-3.4.1.tar.gz
CD Nagios
./configure--prefix=/usr/local/nagios--with-command-group=nagcmd--enable-nanosleep--enable-event-broker
Make all
Make install
Make Install-init
Make Install-commandmode
Make Install-config
Make install-webconf
Cd.. /


2), Installation Nagios-plugins
SCP root@172.26.159.180:/root/xzy/nagios-plugins-1.4.16.tar.gz/usr/local/src/nagios-plugins-1.4.16.tar.gz
Tar zxf nagios-plugins-1.4.16.tar.gz
CD nagios-plugins-1.4.16
./configure--with-nagios-user=nagios--with-nagios-group=nagios--with-openssl=/usr/bin/openssl-- Enable-perl-modules
Make
Make install
Cd.. /


3), Installation Nrpe
SCP root@172.26.159.180:/root/xzy/nrpe-2.13.tar.gz/usr/local/src/nrpe-2.13.tar.gz
Tar zxf nrpe-2.13.tar.gz
CD nrpe-2.13
./configure--with-nrpe-user=nagios--with-nrpe-group=nagios--with-nagios-user=nagios--with-nagios-group=nagios- -enable-command-args--enable-ssl
Make all
Make Install-plugin
Make Install-daemon
Make Install-daemon-config
Cd.. /
Verifying Nrpe Installation
/usr/local/nagios/libexec/check_load-w 15,10,5-c 30,25,20




4), Installation Ndoutils
SCP root@172.26.159.180:/root/xzy/ndoutils-1.5.2.tar.gz/usr/local/src/ndoutils-1.5.2.tar.gz
Tar zxf ndoutils-1.5.2.tar.gz
CD ndoutils-1.5.2
./configure--prefix=/usr/local/nagios
Make
Make install
CP./config/ndo2db.cfg-sample/usr/local/nagios/etc/ndo2db.cfg
CP./config/ndomod.cfg-sample/usr/local/nagios/etc/ndomod.cfg
CP daemon-init/etc/init.d/ndo2db


5 Add the/etc/nagio directory, copy Centreon on the collection server files to the directory, before the Centreon to increase the acquisition server.
6) Modify the/usr/local/nagios/etc/nagios.cfg file to increase the point to/etc/nagio content
7 Add ndoutile Module loading:
BROKER_MODULE=/USR/LOCAL/NAGIOS/BIN/NDOMOD.O config_file=/etc/nagios/ndomod.cfg
8 Add the/usr/lib/nagios/plugins directory, from the other collection server, copy the directory script to the directory.
9) Start Nagios to see if the Nagios process number is passed to the Centreon, successful delivery, that is, successful installation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.