우분투에서는 Smokeping 구축을 굉장히 여러번 해서 큰 어려움이 없었다.
apt-get install smokeping 하면 패키지로 쫙~ 잘 설치가 된다.
컨피그만 수정하면 금방 페이지를 볼 수 있다.
CentOS 로는 한번도 해보지 않았지만, 이번에 시도 해봤다.
CentOS 6.3 기반 Smokeping 설치
#1. rpm 패키지 설치
Install rpmforge
#yum install
http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
#2. 각 종 패키지 설치
Install required packages
#yum install mod_fcgid httpd httpd-devel rrdtool fping wget curl
bind-utils gcc make
#3. 추가 패키지 설치
Install more packages
#yum install perl perl-Net-Telnet perl-Net-DNS perl-LDAP
perl-libwww-perl perl-RadiusPerl perl-IO-Socket-SSL perl-Socket6
perl-CGI-SpeedyCGI perl-FCGI perl-RRD-Simple perl-CGI-SpeedCGI
perl-ExtUtils-MakeMaker
--------Install Apache HTTP Server and Open port
80 ------------------------------------
Apache HTTP
#yum install httpd
#chkconfig --levels 235 httpd on
#/etc/init.d/httpd start
--------------Open Port 80
--------------------------------------------------------------------
#iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp --dport
80 -j ACCEPT
#service iptables save
#service iptables restart
#4. 스모크핑 설치Install smokeping
# wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.8.tar.gz
* You should check on smokeping website for the latest version.
# tar -zxvf smokeping-2.6.8.tar.gz -C /opt/
# mkdir /opt/smokeping
# cd /opt/smokeping-2.6.8/setup
# ./build-perl-modules.sh
# cp -r ../thirdparty /opt/smokeping/
# cd ..
# ./configure --prefix=/opt/smokeping
* There are twice – before the prefix so it is –prefix.
# make install
#5. 스포크핑 디렉에 추가 디렉터리 생성
Create missing folders
# cd /opt/smokeping
# mkdir data
# mkdir var
#6. 스모크핑 실행 파일 다운로드 및 경로 지정
wget http://www.wedebugyou.com/static/smokeping_start_stop.txt
mv smokeping_start_stop.txt /etc/init.d/smokeping
chmod 755 /etc/init.d/smokeping
#7. 컨피그 수정
# cd /opt/smokeping/etc/
# for foo in *.dist; do cp $foo `basename $foo .dist`; done
# chmod 600 /opt/smokeping/etc/smokeping_secrets.dist
Step 8 Change the default config files
# vi config
------------Change the values in bold to something that fit
your needs.--------------
owner = Peter Random
contact = some@address.nowhere
mailhost = my.mail.host
sendmail = /usr/sbin/sendmail
# NOTE: do not put the Image Cache below cgi-bin
# since all files under cgi-bin will be executed … this is not
# good for images.
imgcache = /opt/smokeping/cache
imgurl = cache
datadir = /opt/smokeping/data
piddir = /opt/smokeping/var
cgiurl = http://some.url/smokeping.cgi
smokemail = /opt/smokeping/etc/smokemail.dist
tmail = /opt/smokeping/etc/tmail.dist
---Here is an change bold
owner =
Company
contact = noc@Address
mailhost = host
sendmail = /usr/sbin/sendmail
# NOTE: do not put the Image Cache below
cgi-bin
# since all files under cgi-bin will be executed … this is not
# good for images.
imgcache = /opt/smokeping/cache
imgurl = /cache
datadir = /opt/smokeping/data
piddir = /opt/smokeping/var
cgiurl = http://(IP or Hostname)/cgi-bin/smokeping.fcgi
smokemail = /opt/smokeping/etc/smokemail.dist
tmail = /opt/smokeping/etc/tmail.dist
#9. smokeping httpd 연동
Copy
smokeping files into the webserver
# cp -r /opt/smokeping/htdocs/cropper /var/www/cgi-bin/
# cp /opt/smokeping/htdocs/smokeping.fcgi.dist
/var/www/cgi-bin/smokeping.fcgi
# cd /var/www/html/
# mkdir cache
# chown apache cache
# ln -s /var/www/html/cache /opt/smokeping/cache
#10. 스모크핑 실행
Start
smokeping
# /etc/init.d/httpd start
# /etc/init.d/smokeping start
#11. 측정 할 타겟 설정
Add your
own host in the config file
# Vi /opt/smokeping/etc/config
Please Ctrl+w search word
“Targets” and add host here.
Example add host
*** Targets ***
probe = FPing
menu = Top
title = Network Latency Grapher
remark = Welcome to the SmokePing website of Company.
\
Here you will
learn all about the latency of our networ
#12. 웹페이지 접속
Expect the
worst hope for the best
If there are no error message you are in a very good
position. You can now browse to the webpage you configure in the config file
cgiurl = http://(IP or Hostname) /cgi-bin/smokeping.fcgi.
Here are the steps to add your own configuration
http://(IP or Hostname) /cgi-bin/smokeping.fcgi.
#13. 리부팅 되도 적용 되게 설정.
Enable
smokeping to start automatically on reboot
# chkconfig --add smokeping
* There are twice - before the add so it is –add.
# chkconfig httpd on
# chkconfig smokeping on
도움주신 url : http://yum-opensource.blogspot.com.au/2013/01/how-to-install-smokeping-on-centos-63.html
smokeping_start_stop.txt
RECENT COMMENT