安装smokeping后提示500错误,求大神指点迷津

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装smokeping后提示500错误,求大神指点迷津相关的知识,希望对你有一定的参考价值。

[Wed Jul 17 12:52:07 2013] [error] [client *.*.*.*] [Wed Jul 17 12:52:07 2013] smokeping.cgi: Compilation failed in require at /usr/lib64/perl5/Digest/MD5.pm line 23.
[Wed Jul 17 12:52:07 2013] [error] [client *.*.*.*] [Wed Jul 17 12:52:07 2013] smokeping.cgi: Compilation failed in require at /usr/local/smokeping/lib/Smokeping.pm line 8.
[Wed Jul 17 12:52:07 2013] [error] [client *.*.*.*] [Wed Jul 17 12:52:07 2013] smokeping.cgi: BEGIN failed--compilation aborted at /usr/local/smokeping/lib/Smokeping.pm line 8.
[Wed Jul 17 12:52:07 2013] [error] [client *.*.*.*] [Wed Jul 17 12:52:07 2013] smokeping.cgi: Compilation failed in require at /var/www/html/smokeping/smokeping.cgi line 12.
[Wed Jul 17 12:52:07 2013] [error] [client *.*.*.*] [Wed Jul 17 12:52:07 2013] smokeping.cgi: BEGIN failed--compilation aborted at /var/www/html/smokeping/smokeping.cgi line 12.
[Wed Jul 17 12:52:07 2013] [error] [client *.*.*.*] speedy_backend[5366]: perl_parse error
[Wed Jul 17 12:52:08 2013] [error] [client *.*.*.*] speedy[5364]: Cannot spawn backend process
[Wed Jul 17 12:52:08 2013] [error] [client *.*.*.*] Premature end of script headers: smokeping.cgi

参考技术A 1 smokeping监控安装

yum install -y httpd
yum install -y rrdtool
yum install -y fping
yum install -y echoping
yum install -y curl
yum install -y 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

解压smokeping源码包
tar xvf smokeping-2.6.9.tar.gz

编译安装
cd smokeping-2.6.9
./configure --prefix=/usr/local/smokeping

编译过程提示缺少东西,运行一个脚本
./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty

完成后再次configure
./configure --prefix=/usr/local/smokeping

之后提示使用gmake安装
/usr/bin/gmake install

安装完成后进入smokeping目录

cd /usr/local/smokeping

创建需要用到的目录
mkdir var
mkdir cache
mkdir data
修改权限
chmod 777 -R var
chmod 777 -R cache
chmod 777 -R data
chmod 600 etc/smokeping_secrets.dist
属主改为httpd的用户
chown -R apache.apache /usr/local/smokeping

创建日志文件并修改属主
touch /var/log/smokeping.log
chown apache.apache /var/log/smokeping.log

进入htdocs目录重命名smokeping.fcgi.dist

mv smokeping.fcgi.dist smokeping.fcgi

进入bin目录下修改smokeping文件

use lib qw(); # PERL5LIB
修改为(根据实际路径来,yum安装perl的为这个目录)
use lib qw(/usr/lib/perl5/5.8.8); # PERL5LIB

进入etc目录修改config文件

mv config.dist config
修改config

---------------------------------------------------------------------------------------------------------------------------
*** General ***

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 = /usr/local/smokeping/cache
imgurl = cache
datadir = /usr/local/smokeping/data
piddir = /usr/local/smokeping/var
cgiurl = http://192.168.1.158/smokeping.cgi 《-------本机的iP或者域名
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 = 30 《----------------------数据刷新时间默认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 = utf-8 《-----------------------添加语言支持,不然乱码
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 = Standard 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

#+ hierarchies
#++ owner
#title = Host Owner
#++ location
#title = Location

*** Probes ***

+ FPing

binary = /usr/sbin/fping

*** Slaves ***
secrets=/usr/local/smokeping/etc/smokeping_secrets.dist
+boomer
display_name=boomer
color=0000ff

+slave2
display_name=another
color=00ff00

*** Targets ***

probe = FPing

menu = Top
title = Network Latency Grapher
remark = Welcome to the SmokePing website of xxx Company. \
Here you will learn all about the latency of our network.

+ Test 《--------------一个样本的开始
menu= Targets 《--------菜单名字
#parents = owner:/Test/James location:/

++ James 《----------2级目录

menu = James 《------------2级目录名字
title = 见鬼 《------------标题
host = 192.168.1.158 《-------哪台主机

-------------------------------------------------------------------------------------

修改httpd配置文件
vi /etc/httpd/conf/httpd.conf

添加
Alias /smokeping "/usr/local/smokeping/htdocs/smokeping.fcgi"
Alias /cache "/usr/local/smokeping/cache"
Alias /cropper "/usr/local/smokeping/htdocs/cropper"

<Directory /usr/local/smokeping>
AllowOverride None
AddHandler cgi-script cgi fcgi
Options ExecCGI
Order allow,deny
Allow from all
DirectoryIndex smokeping.cgi
</Directory>

重启httpd
service httpd restart

启动smokeping

perl /usr/local/smokeping/bin/smokeping --logfile=/var/log/smokeping.log

访问smokeping (本次样本为192.168.1.158地址)
http://192.168.1.158/smokeping

关闭smokeping
ps -ef | grep smokeping
找到进程号
kill -9 进程号
我自己写的 你看下吧 哪里出现问题本回答被提问者采纳

安装Ubuntu到这一步就弄不好了,我是用U盘装的!求大神帮忙指点!!!

参考技术A 不要用U盘,直接在原系统下安装,因为这时分区表会有你的U盘分区,但是安装主程序又在U盘上,所以卸载不了,所以安装失败追问

哦哦~~我试试。。直接在Win7下安装叫什么来着??从没试过

追答

就是把下载好的镜像里面的wubi.exe解压出来,然后把镜像拖上去就行了

参考技术B 点后退,然后打开终端输入sudo umount -f /cdrom 参考技术C 你是不是把Ubuntu系统错误地安装在U盘上了?

以上是关于安装smokeping后提示500错误,求大神指点迷津的主要内容,如果未能解决你的问题,请参考以下文章

vs调试没问题,iis发布浏览分析其错误,未能加载类型?很急,求大神。

为啥 Win7 重装电脑后 安装CAJ 装好后 运行的时候它提示 “获取My Documents目录错误”???求大神

安装centos有错误提示找不到安装源,求大神指教(我是硬盘安装)

linux安装minicom错误,求指点。

用IIS浏览asp就出现这样的错误怎么解决啊?跪求大神!!!!

Mudbox 2014 安装后无法启动