|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们!1、概述
比来产物总是报托管到机房的办事器岑岭期协作商的一个IP丢包,本身测试了到目的IP确切丢包(同网段一个丢一个不丢),然则ping其余门户网站正常,协作同伴是国际收集装备部富翁岂非他们的收集有成绩,经由一路调试他们逝世活以为我的收集有成绩,我接洽IDC机房(国际最牛X的)机房收集检测了几天说机房收集正常对方成绩。
奇葩了!!!受老板鸭梨必需查出丢包缘由和丢包点,没方法只要请SmokePing出来给我监控找谜底了。。。。上面进入正题搭建SmokePing实战!
1、情况
体系centos5.864bit
装置情况
httprrdtoolfpingsmokepingCGI-SpeedyCGI
2、装置情况
1、更新yum源
- rpm-Uvhhttp://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
复制代码 2、yum装置情况- yum-yinstallgccgcc-*makemanfilevim-enhancedopenssh-clientslftpftpwgetcurlelinkshttpdhttpd-develexpectntppangosystem-config-network-tuilibxml2-devellibpng-develpangopango-devellibart_lgpllibart_lgpl-develfreetypefreetype-develfontconfigcairocairo-develsendmailyuminstallperlperl-Net-Telnetperl-Net-DNSperl-LDAPperl-libwww-perlperl-RadiusPerlperl-IO-Socket-SSLperl-Socket6perl-CGI-SpeedyCGIyuminstallfpingechoping
复制代码 3、装置rrdtool- wgethttp://bcs.duapp.com/xiueli/rrdtool.tar.gztarzxvfrrdtool.tar.gzmvrrdtool/usr/local/ln/usr/local/rrdtool/bin/rrdtool/usr/bin#这个包的rrdool是1.4.5的曾经编译好的/usr/local/rrdtool/bin/rrdtool#可以检查版本
复制代码 4、装置smokeping
wgethttp://oss.oetiker.ch/smokeping/pub/smokeping-2.4.2.tar.gz
tarzxvfsmokeping-2.4.2.tar.gz
mvsmokeping-2.4.2/usr/local/smokeping
5、设置装备摆设smokeping(这步是搭建smokeping最难的了)- cp/usr/local/smokeping/bin/smokeping.dist/usr/local/smokeping/bin/smokepingcp/usr/local/smokeping/htdocs/smokeping.cgi.dist/usr/local/smokeping/htdocs/smokeping.cgimkdir-p/usr/local/smokeping/htdocs/imgmkdir-p/usr/local/smokeping/var
复制代码- vim/usr/local/smokeping/bin/smokeping内容以下#!/usr/bin/perl-w#-*-perl-*-uselibqw(/usr/local/rrdtool/lib/perl/);#须要更改uselibqw(/usr/local/smokeping/lib/);*须要更改usestrict;usewarnings;useSmokeping2.004002;Smokeping::main("/usr/local/smokeping/etc/config.dist");#须要更改vim/usr/local/smokeping/htdocs/smokeping.cgi#更改,照样下面那三处#!/usr/bin/speedy#-*-perl-*-usestrict;usewarnings;uselibqw(/usr/local/rrdtool/lib/perl/);uselibqw(/usr/local/smokeping/lib/);useCGI::Carpqw(fatalsToBrowser);useSmokeping2.004002;Smokeping::cgi("/usr/local/smokeping/etc/config.dist");
复制代码 最主要的config.dist设置装备摆设
见http://www.yinxiulei.cn/smokeping设置装备摆设文件.html
6、设置登录暗码- htpasswd-c/usr/local/smokeping/htdocs/htpasswdadmin
复制代码 7、apache设置装备摆设- vi/etc/httpd/conf.d/smkeping.conf#参加上面内容ServerAdmin627526297@qq.comDocumentRoot"/usr/local/smokeping/htdocs"ServerNamelocalhost<Directory"/usr/local/smokeping/htdocs">OptionsFollowSymLinksExecCGIAllowOverrideNoneAddHandlercgi-scriptcgiOrderallow,denyAllowfromallAuthName"Smokeping"AuthTypeBasicAuthUserFile/usr/local/smokeping/htdocs/htpasswdRequirevalid-userErrorLoglogs/smokeping-error_logCustomLoglogs/smokeping-access_logcombined
复制代码 3、启动办事器- /etc/init.d/httpdstart/usr/local/smokeping/bin/smokepingstart
复制代码 如正常启动翻开网站- http://ip/smokeping/smokeping.cgi
复制代码 ps成绩处理
smokeping无图图片叉叉,检讨设置装备摆设文件中的imgcache
看imgcache目次内能否稀有据,目次能否在htdocs内
欢迎大家来到仓酷云论坛! |
|