追蹤
帝國反抗君 - PowerOp
關於部落格
2006/11/29 網誌再次搬家,我在樂多網誌 http://blog.roodo.com/ystuan/ 候教
  • 17376

    累積人氣

  • 0

    今日人氣

    0

    追蹤人氣

[筆記]在CentOS 4.3上安裝SmokePing 2.0.8

這次我選上的自由軟體叫做SmokePing,跟MRTG還有RRDTool都出自Tobias Oetiker之手。 [關閉SELinux設定] 真遺憾,搞不定SELinux,只好先這樣弄: (立即生效) setenforce 0 (修改開機設定) /etc/selinux/config 其中一行改成 SELINUX=permissive [檔案下載] RRDTool的rpm檔案我從從DAG RPM Repository的RRDTool頁面取得rrdtool-1.0.50-3.2.el4.rf.i386.rpm以及perl-rrdtool-1.0.50-3.2.el4.rf.i386.rpm fping的rpm檔案一樣從DAG RPM Repositoryfping頁面拿fping-2.4-1.b2.2.el4.rf.i386.rpm來用。 SpeedyCGI還是從DAG RPM Repository的這裡抓perl-CGI-SpeedyCGI-2.22-1.2.el4.rf.i386.rpm SmokePing我從這裡抓smokeping-2.0.8.tar.gz [安裝] rpm -Uvh rrdtool-1.0.50-3.2.el4.rf.i386.rpm rpm -Uvh perl-rrdtool-1.0.50-3.2.el4.rf.i386.rpm rpm -Uvh fping-2.4-1.b2.2.el4.rf.i386.rpm rpm -Uvh perl-CGI-SpeedyCGI-2.22-1.2.el4.rf.i386.rpm 根據smokeping_install文件,只要把smokeping的.tgz檔解壓縮,修改一些設定,就可以執行smokeping了。 cd /usr/local ; tar zxvf ~/packages/smokeping-2.0.8.tar.gz ; mv smokeping-2.0.8 smokeping ; cd smokeping (上文~/packages/smokeping-2.0.8.tar.gz是我放下載回來檔案的地方) cp -p bin/smokeping.dist bin/smokeping vi bin/smokeping (bin/smokeping要能夠找到perl, Smokeping.pm, RRDs.pm) 原本是
#!/usr/sepp/bin/perl-5.8.4 -w # -*-perl-*- use lib qw(/usr/pack/rrdtool-1.0.49-to/lib/perl); use lib qw(lib); use Smokeping 2.000008; Smokeping::main("etc/config.dist");
改成
#!/usr/bin/perl -w # -*-perl-*- use lib qw(/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi); use lib qw(/usr/local/smokeping/lib); use Smokeping 2.000008; Smokeping::main("/usr/local/smokeping/etc/config");
cp -p htdocs/smokeping.cgi.dist htdocs/smokeping.cgi vi htdocs/smokeping.cgi 原本
#!/usr/sepp/bin/speedy -w # -*-perl-*- use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl); use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib); use CGI::Carp qw(fatalsToBrowser); use Smokeping 2.000008; Smokeping::cgi("/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config");
改成
#!/usr/bin/speedy -w # -*-perl-*- use lib qw(/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi); use lib qw(/usr/local/smokeping/lib/); use CGI::Carp qw(fatalsToBrowser); use Smokeping 2.000008; Smokeping::cgi("/usr/local/smokeping/etc/config");
cp -p htdocs/smokeping.cgi /var/www/cgi-bin/ cp -p etc/config.dist etc/config vi etc/config 把這個檔我改的部份貼出來:(注意,這個檔案最後一段是設定要ping哪些機器,請自己修改官方範例,不在此贅述) (請依照自己的情況,替換底下的ip位址)
imgcache = /var/www/html/smokeping/img imgurl = http://192.168.100.1/smokeping/img datadir = /usr/local/smokeping/var piddir = /usr/local/smokeping/var cgiurl = http://192.168.100.1/cgi-bin/smokeping.cgi smokemail = /usr/local/smokeping/etc/smokemail tmail = /usr/local/smokeping/etc/tmail template = /usr/local/smokeping/etc/basepage.html binary = /usr/sbin/fping
再來: mkdir -p /usr/local/smokeping/var mkdir -p /var/www/html/smokeping/img cp -p etc/smokemail.dist etc/smokemail cp -p etc/tmail.dist etc/tmail cp -p etc/basepage.html.dist etc/basepage.html [啟動apache web server] chkconfig httpd on service httpd start [執行smokeping] bin/smokeping & [測試](請依照自己的情況,替換底下的ip位址) http://192.168.100.1/smokeping.cgi [參考文章] Smokeping 安裝,作者是在Fedora Core 3上安裝SmokePing 1.38
相簿設定
標籤設定
相簿狀態