1)更改配置的源:
cd /etc/yum.repos.d/
wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
【安装相关软件】
smokeping 是一个用 perl 写的程序,所以不需要安装。但是他需要使用一些工具以及 perl 的 module,还有 rrdtool、fping、echoping 等,这些都需要预先安装好。smokeping 启动的时候,也会自己去检查需要用到的程序是否能找到。
配置好了 yum后 :
# yum -y install freetype-devel zlib-devel libpng-devel libart_lgpl-devel
2关闭 selinux
# setenforce 0
或
# vi /etc/sysconfig/selinux
将 SELINUX=enforcing
改成 SELINUX=disabled
重启后生效
3).安装RRDTool
由于rrdtool-1.2.23需要一些库文件支持,故需先安装配置支持的环境,然后编译安装。直接运行以下bash脚本
就可以完成安装:
由于rrdtool-1.2.23需要一些库文件支持,故需先安装配置支持的环境,然后编译安装。直接运行以下bash脚本
就可以完成安装:
注意:将cgilib-0.5.tar.gz、zlib-1.2.3.tar.gz、libpng-1.2.18.tar.gz、freetype-2.3.5.tar.gz、
libart_lgpl-2.3.17.tar.gz、rrdtool-1.2.23.tar.gz放到/root/rrdtool-1.2.23目录下,将脚本保存
为/root/rrdtool-1.2.23/rrdtoolinstall.sh,并给执行权限chmod u+x
/root/rrdtool-1.2.23/rrdtoolinstall.sh
#!/bin/sh
BUILD_DIR=`pwd`
INSTALL_DIR=/usr/local/rrdtool
cd $BUILD_DIR
tar zxf cgilib-0.5.tar.gz
cd cgilib-0.5
make CC=gcc CFLAGS="-O3 -fPIC -I."
mkdir -p $BUILD_DIR/lb/include
cp *.h $BUILD_DIR/lb/include
mkdir -p $BUILD_DIR/lb/lib
cp libcgi* $BUILD_DIR/lb/lib
cd $BUILD_DIR
tar zxf zlib-1.2.3.tar.gz
cd zlib-1.2.3
env CFLAGS="-O3 -fPIC" ./configure --prefix=$BUILD_DIR/lb
make
make install
cd $BUILD_DIR
tar zxvf libpng-1.2.18.tar.gz
cd libpng-1.2.18
env CPPFLAGS="-I$BUILD_DIR/lb/include" LDFLAGS="-L$BUILD_DIR/lb/lib" CFLAGS="-O3 -fPIC" \
./configure --disable-shared --prefix=$BUILD_DIR/lb
make
make install
cd $BUILD_DIR
tar zxvf freetype-2.3.5.tar.gz
cd freetype-2.2.5
env CPPFLAGS="-I$BUILD_DIR/lb/include" LDFLAGS="-L$BUILD_DIR/lb/lib" CFLAGS="-O3 -fPIC" \
./configure --disable-shared --prefix=$BUILD_DIR/lb
make
make install
cd $BUILD_DIR
tar zxvf libart_lgpl-2.3.17.tar.gz
cd libart_lgpl-2.3.17
env CFLAGS="-O3 -fPIC" ./configure --disable-shared --prefix=$BUILD_DIR/lb
make
make install
IR=-I$BUILD_DIR/lb/include
CPPFLAGS="$IR $IR/libart-2.0 $IR/freetype2 $IR/libpng"
LDFLAGS="-L$BUILD_DIR/lb/lib"
CFLAGS=-O3
export CPPFLAGS LDFLAGS CFLAGS
cd $BUILD_DIR
tar zxf rrdtool-1.2.23.tar.gz
cd rrdtool-1.2.23
./configure --prefix=$INSTALL_DIR --disable-python --disable-tcl && make && make install
//完成后建立符号连接
ln -s /usr/local/rrdtool/bin/* /usr/local/bin/
//执行rrdtool看是否安装正确
4. #Install httpd
useradd www
cd /usr/local/src
tar zxvf httpd-2.2.8.tar.gz
cd httpd-2.2.8
./configure --prefix=/usr/local/apache2 --enable-module=so --enable-rewrite
make && make install
5.#Install fping
wget http://fping.sourceforge.net/download/fping.tar.gz
#Install fping
cd /usr/local/src
tar zxvf fping.tar.gz
cd fping-2.4b2_to/
./configure
make && make install
6.#Install CGI-SpeedyCGI
wget http://daemoninc.com/SpeedyCGI/CGI-SpeedyCGI-2.22.tar.gz
#Install CGI-SpeedyCGI
cd /usr/local/src
tar -zxvf CGI-SpeedyCGI-2.22.tar.gz
cd CGI-SpeedyCGI-2.22
perl Makefile.PL
Compile mod_speedycgi (default no)? no
cd /usr/local/src
wget ftp://195.220.108.108/linux/epel/5/i386/mod_speedycgi-2.22-4.el5.i386.rpm
rpm -ivh mod_speedycgi-2.22-4.el5.i386.rpm
warning: mod_speedycgi-2.22-4.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
error: Failed dependencies:
perl-CGI-SpeedyCGI = 2.22-4.el5 is needed by mod_speedycgi-2.22-4.el5.i386
wget ftp://fr.rpmfind.net/linux/EPEL/5Server/i386/perl-CGI-SpeedyCGI-2.22-4.el5.i386.rpm
rpm -ivh --force perl-CGI-SpeedyCGI-2.22-4.el5.i386.rpm
rpm -ivh mod_speedycgi-2.22-4.el5.i386.rpm
cd /usr/local/src/ CGI-SpeedyCGI-2.22
make && make install
7.#Install Perl modules libwww-perl
cd /usr/local/src
wget http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/libwww-perl-5.836.tar.gz
tar -zxvf libwww-perl-5.836.tar.gz
cd libwww-perl-5.836
perl Makefile.PL
make && make install
8. #Install smokeping
wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.4.2.tar.gz
cd /usr/local/src
tar -zxvf smokeping-2.4.2.tar.gz
mv smokeping-2.4.2 /usr/local/smokeping
修改smokeping&httpd配置文件
mkdir -p /usr/local/smokeping/htdocs/img
mkdir -p /usr/local/smokeping/var
smokeping/bin下
cd /usr/local/smokeping/bin
mv smokeping.dist smokeping
修改smokeping文件
file: smokeping
use lib qw(/usr/lib/perl5);
use lib qw(/usr/local/smokeping/lib);
Smokeping::main("/usr/local/smokeping/etc/config");
重命名config文件
cd /usr/local/smokeping/etc
cp config.dist config
修改 config文件为以下内容(全部粘上来做参考)
[root@localhost etc]# cat config
*** General ***
owner = xiao hu
contact = hjjie2006@126.com
mailhost = my.mail.host
sendmail = /usr/lib/sendmail
imgcache = /usr/local/smokeping/htdocs/img
imgurl = http://192.168.166.202/htdocs/img
datadir = /usr/local/smokeping/var
piddir = /usr/local/smokeping/var
cgiurl = http://192.168.166.202/htdocs/smokeping.cgi
smokemail = /usr/local/smokeping/etc/smokemail.dist
tmail = /usr/local/smokeping/etc/tmail.dist
# specify this to get syslog logging
syslogfacility = local0
# each probe is now run in its own process
# disable this to revert to the old behaviour
# concurrentprobes = no
*** Alerts ***
to = alertee@address.somewhere
from = smokealert@company.xy
+someloss
type = loss
# in percent
pattern = >0%,*12*,>0%,*12*,>0%
comment = loss 3 times in a row
*** Database ***
step = 300
pings = 20
# consfn mrhb steps total
AVERAGE 0.5 1 1008
AVERAGE 0.5 12 4320
MIN 0.5 12 4320
MAX 0.5 12 4320
AVERAGE 0.5 144 720
MAX 0.5 144 720
MIN 0.5 144 720
*** Presentation ***
charset = gb2312
template = /usr/local/smokeping/etc/basepage.html.dist
+ charts
menu = Charts
title = The most interesting destinations
++ stddev
sorter = StdDev(entries=>4)
title = Top Standard Deviation
menu = Std Deviation
format = Stdandard Deviation %f
++ max
sorter = Max(entries=>5)
title = Top Max Roundtrip Time
menu = by Max
format = Max Roundtrip Time %f seconds
++ loss
sorter = Loss(entries=>5)
title = Top Packet Loss
menu = Loss
format = Packets Lost %f
++ median
sorter = Median(entries=>5)
title = Top Median Roundtrip Time
menu = by Median
format = Median RTT %f seconds
+ overview
width = 600
height = 50
range = 10h
+ detail
width = 600
height = 200
unison_tolerance = 2
"Last 3 Hours" 3h
"Last 30 Hours" 30h
"Last 10 Days" 10d
"Last 400 Days" 400d
*** Probes ***
+ FPing
binary = /usr/local/sbin/fping
#*** Slaves ***
#secrets=/usr/local/smokeping/etc/smokeping_secrets.dist
#+boomer
#display_name=boomer
#color=0000ff
#+slave2
*** Targets ***
probe = FPing
menu = Top
title = Network Latency Grapher
remark = Welcome to this SmokePing website.
+ mysite1
menu = IDC
title = Hosts
++ myhost1
host = 211.150.70.1
++ myhost2
host = 61.55.164.1
++ myhost3
host = 124.115.15.1
++ company
host = 211.150.70.6
修改smokeping.cgi
cd /usr/local/smokeping/htdocs
cp smokeping.cgi.dist smokeping.cgi
file:smokeping.cgi
use lib qw(/usr/lib/perl5/);
use lib qw(/usr/local/smokeping/lib);
Smokeping::cgi("/usr/local/smokeping/etc/config");
修改apache配置httpd.conf
vim /usr/local/apache2/conf/httpd.conf
<VirtualHost *:80>
DocumentRoot /usr/local/smokeping
ServerName smokeing
AddHandler cgi-script .cgi
<Directory "/usr/local/smokeping/htdocs/">
AllowOverride None
Options ExecCGI Indexes
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/ping-error_log
CustomLog logs/ping-access_log common
</VirtualHost>
chown -R daemon.daemon /usr/local/smokeping
修改httpd.conf运行权限daemon
然后,为了不让 apache 找 mysql 去认证,需要:
yum install mod_auth_mysql
启动
iptables -F
/usr/local/smokeping/bin/smokeping start
/usr/local/apache2/bin/apachectl start
报错解决
cp -rp /usr/local/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/* /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/
ps -ef|grep smokeping
ps -aux | grep http
访问
http://192.168.166.202/htdocs/smokeping.cgi
网上的一个smokeping
http://oss.oetiker.ch/smokeping-demo/?target=Customers.OP
分享到:
相关推荐
yum install smokeping –y 可能需要 epel 源,epel 源是 Enterprise Linux 的扩展源,提供了许多额外的软件包,包括 Smokeping。如果没有启用 epel 源,需要先启用 epel 源,然后才能安装 Smokeping。 配置 Smoke...
《Smokeping for Windows详细安装教程》 Smokeping是一款强大的网络监控工具,专用于测量和展示网络延迟和丢包情况。本文将详细介绍如何在Windows环境中,结合IIS、RRDTOOL和Perl来安装和配置Smokeping 2.6.8。 **...
sudo apt-get install smokeping ``` 完成安装后,可以通过浏览器访问`http://<服务器IP>/cgi-bin/smokeping.cgi`查看Smokeping界面。 #### 三、Smokeping配置 **配置文件路径:** - `/etc/smokeping/config.d/...
### CentOS 6.x 配置 Smokeping 的详细步骤 Smokeping 是一款优秀的网络延迟监控工具,主要用于检测网络链路质量的变化。它通过周期性地发送 ICMP 数据包来测量往返时间 (RTT),并以图形化的形式展示出来。下面将...
apt-get install smokeping ``` 安装过程中,对所有提示回答“Y”,以确认安装。 **配置与启动 Smokeping** 1. 安装完成后,你需要配置Smokeping以监控特定的主机。编辑`/etc/smokeping/config.d/Targets`文件,...
apt-get install smokeping ``` 安装完成后,你可以通过浏览器访问http://[IP]/cgi-bin/smokeping.cgi来查看Smokeping的界面。这里的[IP]是你的Ubuntu服务器的IP地址。 不过,此时的Smokeping还是默认配置,需要...
** Smokeping 安装与配置详解** Smokeping 是一个开源的网络延迟和包丢失监控工具,它使用 ICMP echo 请求(ping)来收集数据并以图形化的方式展示网络延迟的波动情况。本文将详细介绍如何在 Linux 系统上安装并...
[root@linux-a Smokeping-2.6.17]# make && make install ``` 4. 创建配置文件和目录: ```bash [root@linux-a Smokeping-2.6.17]# mkdir -p /var/lib/smokeping [root@linux-a Smokeping-2.6.17]# chown -R ...
【 Smokeping 简介】 Smokeping 是一款由 Tobi Oetiker 创造的开源监控工具,其设计目的是对网络延迟和丢包率进行详细而深入的监控。由于其作者同时也是 rrdtool(Round Robin Database Tool)的创造者,Smokeping ...
《CentOS7环境下自动化安装Smokeping的详细指南》 在运维工作中,监控系统性能和网络状态至关重要,而Smokeping就是这样一款强大的网络延迟和可用性监控工具。本文将详细介绍如何在CentOS7系统上使用自动化脚本来...
** Smokeping 6.5 在 CentOS 6.5 上的快速安装指南** Smokeping 是一个开源的网络监控工具,主要用于追踪网络延迟和丢包情况,它以可视化的图表形式展示网络性能,帮助管理员识别和解决问题。在 CentOS 6.5 这样的...
吸烟配置 smokeping config是我们将debian / ubuntu的stock ...apt-get install smokeping service smokeping stop mkdir -p /home/chicks/Documents/git cd /home/chicks/Documents/git git clone git@github.c
** Smokeping 安装与 Echoping 深度解析** `Smokeping` 是一个开源的网络监控工具,专门用于追踪网络延迟和丢包情况,它以“ping”为基础,通过绘制精美的图表来展示网络状况。而 `Echoping` 是 Smokeping 的一部分...
在CentOS 5.4环境下安装Smokeping全手册中,首先对Smokeping进行了简介。Smokeping是由rrdtool的作者Tobi Oetiker所开发,是一款开源工具,它具有图形显示方面的优势,并且具备多种探测方式,比如fping、echoping、...
### CentOS 5.4 下完美配置SmokePing 在本文中,我们将详细介绍如何在 CentOS 5.4 上配置 SmokePing,并确保其稳定运行。SmokePing 是一款功能强大的网络延迟监测工具,能够帮助网络管理员实时监控网络状况,对于...
./configure --prefix=/usr/local/smokeping && gmake install && gmake install ``` ### 配置步骤 4. **配置环境** - 修改 `rrdtool` 的 Perl 路径以确保正确引用。 - 创建首页文件并复制到 Apache 的 htdocs...
【smokeping】是一款强大的网络监控工具,由rrdtool的创始人Tobi Oetiker开发。它的核心优势在于其出色的图形展示能力,并提供了多种探测手段,如fping、echoping、dig、curl等,便于全面了解网络状况。此外,smoke...
《 Smokeping 2.6.8:网络延迟与可用性监控的强大工具》 Smokeping是一款开源的网络监控工具,主要用于追踪网络延迟和可用性。它的最新版本“smokeping-2.6.8.tar.gz”提供了更为精细和全面的网络性能监测功能。...
sudo apt-get install -y smokeping ``` #### 三、Smokeping配置 安装完成后,可以通过浏览器访问`http://[服务器IP]/cgi-bin/smokeping.cgi`来查看Smokeping的初始界面。然而,为了使其真正发挥作用,还需要进行...