您好,登錄后才能下訂單哦!
本篇內(nèi)容介紹了“如何安裝配置Smokeping”的有關(guān)知識(shí),在實(shí)際案例的操作過(guò)程中,不少人都會(huì)遇到這樣的困境,接下來(lái)就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
Smokeping 是一款用于網(wǎng)絡(luò)性能監(jiān)測(cè)的監(jiān)控軟件,通過(guò)它可以在自己公司IDC的網(wǎng)絡(luò)狀況,如延時(shí),丟包率,是否BGP多線等,通過(guò)rrdtool制圖方式,圖形化地展示網(wǎng)絡(luò)的時(shí)延情況,進(jìn)而能夠清楚的判斷出網(wǎng)絡(luò)的即時(shí)通信情況
一.安裝軟件
1.使用yum 命令安裝所需的工具 (依賴包好多)
yum install gcc freetype-devel zlib-devel libpng-devel libart_lgpl-devel httpd-devel apr-util-devel apr-devel cairo cairo-devel pango pango-devel libxml2 libxml2-devel perl-XML-Simple.noarch perl-Crypt-SSLeay perl-Digest-HMAC
2. 安裝rrdtool
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.6.tar.gz
tar zxvf rrdtool-1.3.6.tar.gz
cd rrdtool-1.3.6
./configure --disable-tcl
make
make install
3. 安裝cgilib
wget http://down1.chinaunix.net/distfiles/cgilib-0.5.tar.gz
tar zxvf cgilib-0.5.tar.gz
cd cgilib-0.5
make
cp libcgi.a /usr/local/lib
cp cgi.h /usr/include
4. 安裝fping
wget http://fping.sourceforge.net/download/fping.tar.gz
tar zxvf fping.tar.gz
cd fping-2.4b2_to
./configure
make
make check
make install
5.安裝 echoping
wget http://jaist.dl.sourceforge.net/project/echoping/echoping/6.0.0/echoping-6.0.0.tar.gz
tar zxvf echoping-6.0.0.tar.gz
cd echoping-6.0.0
./configure
make
make test
make install
6.安裝 CGI-SpeedyCGI
wget ftp://195.220.108.108/linux/epel/5/x86_64/mod_speedycgi-2.22-4.el5.x86_64.rpm
wget ftp://ftp.muug.mb.ca/mirror/fedora/epel/5/x86_64/perl-CGI-SpeedyCGI-2.22-4.el5.x86_64.rpm
rpm -ivh --force perl-CGI-SpeedyCGI-2.22-4.el5.x86_64.rpm
rpm -ivh mod_speedycgi-2.22-4.el5.x86_64.rpm
wget http://mirrors.163.com/cpan/authors/id/H/HO/HORROCKS/CGI-SpeedyCGI-2.22.tar.gz
tar zxvf CGI-SpeedyCGI-2.22.tar.gz
cd CGI-SpeedyCGI-2.22
perl Makefile.PL
遇到問(wèn)題選擇默認(rèn)選項(xiàng)(no)
make
make test
make install
7.安裝smokeping
wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.3.6.tar.gz
tar zxvf smokeping-2.3.6.tar.gz
mv smokeping-2.3.6 /usr/local/smokeping
cd /usr/local/smokeping
二.配置smokeping
1. 修改文件名
修改/usr/local/smokeping/bin下的smokeping.dist
cp smokeping.dist smokeping
修改etc/ 下的 basepage.html.dist,config.dist,smokemail.dist
cp basepage.html.dist basepage.html
cp config.dist config
cp smokemail.dist smokemail
chmod 600 smokeping_secrets.dist
修改htdoc/下的smokeping.cgi.dist
cp smokeping.cgi.dist smokeping.cgi
2. 修改配置文件
配置 bin/smokeping
vi /usr/local/smokeping/bin/smokeping
在這個(gè)文件里面我們需要修改前面兩個(gè) lib 和后面 config 文件的 path。
兩個(gè) lib 分別是 smokeping 的 lib 和 rrdtool 的 lib (紅色為修改后的內(nèi)容)
#!/usr/sepp/bin/perl-5.8.4 -w
#!/usr/bin/perl -w
use lib qw(/usr/pack/rrdtool-1.2.23-mo/lib/perl);
use lib qw(/usr/local/rrdtool-1.3.6/lib/perl);
use lib qw(lib);
use lib qw(/usr/local/smokeping/lib);
use Smokeping 2.003006;
Smokeping::main("etc/config.dist");
Smokeping::main("/usr/local/smokeping/etc/config");
配置 htdocs/smokeping.cgi,方法與上面相同
vi /usr/local/smokeping/htdocs/smokeping.cgi
************************
#!/usr/sepp/bin/speedy -w
#-*-perl-*-
#!/usr/bin/speedy -w
# -*-perl-*-
# use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl);
use lib qw(/usr/local/rrdtool-1.3.6/lib/perl/);
# use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib);
use lib qw(usr/local/smokeping//lib);
use Smokeping 2.003006;
Smokeping::cgi("/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config");
Smokeping::cgi("/usr/local/smokeping/etc/config");
配置 etc/config
vi usr/local/smokeping/etc/config 將以下幾行替換為已經(jīng)安裝的相關(guān)軟件的路徑
*** General ***
imgcache = /home/oetiker/public_html/smokeping-ms/cache
imgcache = /usr/local/smokeping/htdocs/cache
imgurl = cache
imgurl = cache
datadir = /tmp/smokeping-ms/data
datadir = /usr/local/smokeping/var
piddir = /tmp/smokeping-ms/var
piddir = /usr/local/smokeping/var
cgiurl = http://some.url/smokeping.cgi
cgiurl = http://本機(jī)IP/htdocs/smokeping.cgi ;
smokemail = /home/oetiker/checkouts/smokeping/trunk/software/etc/smokemail.dist
smokemail = /usr/local/smokeping/etc/smokemail
tmail = /home/oetiker/checkouts/smokeping/trunk/software/etc/tmail.dist
tmail = /usr/local/smokeping/etc/tmail.dist
*** Presentation ***
template= /home/oetiker/checkouts/smokeping/trunk/software/etc/basepage.html.dist
template = /usr/local/smokeping-2.3.6/etc/basepage.html
*** Probes ***
+ FPing
binary = /usr/sbin/fping
binary = /usr/local/sbin/fping
#** Database ***
step = 60
pings = 10
修改ping的頻率,默認(rèn)為300秒ping20 次,我們可以根據(jù)需要調(diào)整,這里修改為60秒 ping 10次。
*** Targets ***
#=================================
#這里用于配置監(jiān)控目標(biāo),以+號(hào)分層,+為首頁(yè),++為子層,我們以百度和搜狐為例。
+TEST
menu= TEST
title = TEST
++ baidu
menu = baidu
title = baidu
host = 115.239.210.27
++ sohu
menu = sohu
title = sohu
host = 121.14.0.97
#=================================
3. 添加目錄
建立下面三個(gè)目錄用于保存smokeping的數(shù)據(jù)等
mkdir /usr/local/smokeping/data
mkdir /usr/local/smokeping/var
mkdir /usr/local/smokeping/htdocs/cache
chown –R apache:apache /usr/local/smokeping
4. 修改apache配置文件
vi /etc/httpd/conf/httpd.conf
添加下面內(nèi)容:
Alias /smokeping/ "/usr/local/smokeping/htdocs/"
Alias /cache/ "/usr/local/smokeping/cache/"
<Directory "/usr/local/smokeping/htdocs">
Options FollowSymLinks ExecCGI
AllowOverride None
AddHandler cgi-script cgi
Order allow,deny
Allow from all
</Directory>
三.啟動(dòng)
1.重啟apache
service httpd restart
2.重啟smokeping
/usr/local/smokeping/bin/smokeping restart
完成。
“如何安裝配置Smokeping”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注億速云網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。