CentOS Installation smokeping Tutorial

Source: Internet
Author: User
Tags ldap rrdtool install perl smokeping

CentOS Installation smokeping Tutorial

I. Installing basic dependency Packages

-UHV http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/rpms/rpmforge-release-0.5.3-1.el6.rf.x86_64. RPM-UHV http://apt.sw.be/redhat/el6/en/i386/rpmforge/rpms/ rpmforge-release-0.5.3-1.el6.rf.i686.rpm-y install rrdtool fping echoping Curlbind--  -y Install perl perl-net-telnet perl-net-dns perl-ldap Perl-libwww-perl Perl-radiusperl Perl-io-socket-ssl Perl-socket6 perl-cgi-speedycgi gcc wget perl-cpan perl-devel perl-fcgi perl-cgi Rrdtool-perl

Two. Smokeping Compile and install

wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.9.tar.gzTar zxvf smokeping-2.6.9. TAR.GZCD smokeping-2.6.9./setup/build-perl-modules.sh/usr/local/smokeping/thirdparty./configure--prefix=/usr/local/smokeping/usr/bin/gmake install#copy FILECP/usr/local/smokeping/etc/config.dist/usr/local/smokeping/etc/CONFIGCP/usr/local/smokeping/htdocs/smokeping.fcgi.dist/usr/local/smokeping/htdocs/smokeping.fcgi#create Directorysmkdir-p/usr/local/smokeping/cache/usr/local/smokeping/data/usr/local/smokeping/varChown-R apache.apache/usr/local/smokeping/cache/usr/local/smokeping/data/usr/local/smokeping/var#create Log Filetouch/var/log/Smokeping.logchown Apache.apache/var/log/smokeping.log

Three. Configuring Apache and Basic Authentication

Echo'Alias/cache "/usr/local/smokeping/cache/"Alias/cropper"/usr/local/smokeping/htdocs/cropper/"Alias/smokeping"/usr/local/smokeping/htdocs/smokeping.fcgi"<directory"/usr/local/smokeping">allowoverride None Options all AddHandler CGI-script. cgi. fcgi Order allow,deny allow fromAll allowoverride authconfig authname"smokeping"authtype Basic authuserfile/usr/local/smokeping/htdocs/htpasswd Require Valid-User DirectoryIndex smokeping.fcgi</Directory>'>/etc/httpd/conf.d/smokeping.confhtpasswd-C/USR/LOCAL/SMOKEPING/HTDOCS/HTPASSWD ca0gu0

#/usr/local/smokeping/bin/smokeping--config=/usr/local/smokeping/etc/config--"User: passwd" >/usr/local/smokeping/etc/ /usr/local/smokeping/etc//usr/ Local/smokeping/etc/smokeping_secrets.dist

vi/etc/init.d/smokeping#!/bin/bash## chkconfig:2345  the  to# description:smokeping INIT.D script# hacked By:how2centos-http://www.how2centos.com# Get function fromfunctions Library./etc/init.d/functions# Start the service Smokepingstart () {echo-N"starting smokeping:"/usr/local/smokeping/bin/smokeping--config=/usr/local/smokeping/etc/config--logfile=/var/log/smokeping.log--debug-daemon >/dev/NULL 2>&1RETVAL=$?[$RETVAL==0] && Success $"smokeping Startup"[$RETVAL==0] && Touch/var/Lock/subsys/smokeping Echoreturn$RETVAL}# Restart the service smokepingstop () {echo-N"stopping smokeping:"Kill-9' PS Ax | Grep"/usr/local/smokeping/bin/smokeping"| Grep-v grep | Awk"{print $}"' >/dev/NULL 2>&1Success $"smokeping shutdown"RM-F/var/Lock/subsys/smokeping echo}### Main Logic # # # Case " $" inchstart) Start;  stop) stop;; Status)if[-F/var/Lock/subsys/smokeping]; Then Echo"smokeping is runing"Exit0fi echo"smokeping is stopped"Exit3        ;; Restart|reload|Condrestart) stop start;; *) echo $"Usage: $ {start|stop|restart|reload|status}"Exit1Esacexit0

Chown-r apache.apache/usr/local/smokeping/cache/usr/local/smokeping/data/usr/local/smokeping/var

Four. Monitoring node configuration

#64bitrpm-UHV http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/rpms/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm#32bit #rpm-UHV http://apt.sw.be/redhat/el6/en/i386/rpmforge/rpms/rpmforge-release-0.5.3-1.el6.rf.i686.rpm#installyum-y install RRDtool fping echoping Curl bind-utils Yum-y install httpd yum-y Install perl perl-net-telnet perl-net-dns perl-ldap perl-libwww-perl perl-radiusperl perl-io-socket-ssl Perl-Socket6 perl-cgi-speedycgi gcc wget perl-cpan perl-devel perl-fcgi perl-cgi rrdtool-perlwget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.9.tar.gzTar zxvf smokeping-2.6.9. TAR.GZCD smokeping-2.6.9./setup/build-perl-modules.sh/usr/local/smokeping/thirdparty./configure--prefix=/usr/local/smokeping/usr/bin/gmake Installmkdir-p/usr/local/smokeping/Cachechmod -/usr/local/smokeping/etc/Smokeping_secrets.distecho"passwd">/usr/local/smokeping/etc/smokeping_secrets.dist

vi/etc/init.d/smokeping#!/bin/bash## chkconfig:2345  the  to# description:smokeping INIT.D script# hacked By:how2centos-http://www.how2centos.com# Get function fromfunctions Library./etc/init.d/functions# Start the service Smokepingstart () {echo-N"starting smokeping:"/usr/local/smokeping/bin/smokeping--master=http://Ca0gu0:[email protected]:80/smokeping/smokeping.fcgi \--cache-dir=/usr/local/smokeping/Cache--shared-secret=/usr/local/smokeping/etc/smokeping_secrets.dist--slave-name=User--logfile=/var/log/Smokeping.log--debug-daemon >/dev/NULL 2>&1# # Create theLockFile # # # Success $"smokeping Startup"Touch/var/Lock/subsys/smokeping echo}# Restart the service smokepingstop () {echo-N"stopping smokeping:"Kill-9' PS Ax | Grep"/usr/local/smokeping/bin/smokeping"| Grep-v grep | Awk"{print $}"' >/dev/NULL 2>&1# # Now, delete theLockFile # # # RM-F/var/Lock/subsys/smokeping Success $"smokeping shutdown"echo}### Main Logic # # # Case " $" inchstart) Start;  stop) stop;; Status)if[-F/var/Lock/subsys/smokeping]; Then Echo"smokeping is runing"Exit0fi echo"smokeping is stopped"Exit3        ;; Restart|reload|Condrestart) stop start;; *) echo $"Usage: $ {start|stop|restart|reload|status}"Exit1Esacexit0

CentOS Installation smokeping Tutorial

Related Article

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.