天天看點

CentOS6 smokeping安裝配置

smokeping安裝部署文檔:

下載下傳smokeping

http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.11.tar.gz

安裝第三方源

rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

安裝依賴包

yum -y 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-CGI-SpeedCGI perl-Time-HiRes perl-ExtUtils-MakeMaker perl-RRD-Simple rrdtool rrdtool-perl fping echoping gcc libxml2-devel libpng-devel glib pango pango-devel freetype freetype-devel fontconfig cairo cairo-devel libart_lgpl libart_lgpl-devel mod_fastcgi

解壓

tar xf smokeping-2.6.11.tar.gz

cd smokeping-2.6.11

./configure --prefix=/usr/local/smokeping/

編譯會報錯,缺少依賴的Perl子產品

安裝Perl子產品:(需要到國外下載下傳包,這一步非常慢,重試N多次Perl子產品才安裝全)

./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty

gmake install

cd /usr/local/smokeping/

mkdir cache data var

chown apache:apache cache data var

cd /usr/local/smokeping/htdocs/

mv smokeping.fcgi.dist smokeping.fcgi

cd /usr/local/smokeping/etc/

mv config.dist config

chmod 600 smokeping_secrets.dist

vim config

cgiurl  = http://some.url/smokeping.cgi

把some.url修改為你的ip或者域名

# 需提前安裝Apache

vim /etc/httpd/conf/httpd.conf 修改Apache配置檔案

全局配置段加如下配置

AddHandler cgi-script .cgi .fcgi

DirectoryIndex index.html index.html.var smokeping.fcgi

DocumentRoot "/var/www/html" # DocumentRoot下添加如下配置

Alias /cache "/usr/local/smokeping/cache/"

Alias /cropper "/usr/local/smokeping/htdocs/cropper/"

Alias /smokeping "/usr/local/smokeping/htdocs/smokeping.fcgi"

<Directory />

    Options FollowSymLinks ExecCGI

    AllowOverride None

</Directory>

service httpd restart

/usr/local/smokeping/bin/smokeping start

浏覽器打開

http://some.url/smokeping

有些地方中文顯示亂碼,修改配置檔案,Presentation配置段修改字元集

繼續閱讀