[root@C65-A1 smokeping-2.6.9]# cd /usr/local/smokeping/
[root@C65-A1 smokeping]# mkdir -p var cache data
[root@C65-A1 smokeping]# touch /var/log/smokeping.log
[root@C65-A1 smokeping]# chown apache:apache var cache data
[root@C65-A1 smokeping]# chown apache:apache /var/log/smokeping.log
[root@C65-A1 smokeping]# ls
bin cache data etc htdocs lib share thirdparty var
[root@C65-A1 smokeping]# cd /usr/local/smokeping/htdocs/
[root@C65-A1 htdocs]# ls
cropper smokeping.fcgi.dist
[root@C65-A1 htdocs]# cp -p smokeping.fcgi.dist /tmp/
[root@C65-A1 htdocs]# mv smokeping.fcgi.dist smokeping.fcgi
[root@C65-A1 htdocs]# cd /usr/local/smokeping/etc/
[root@C65-A1 etc]# ls
basepage.html.dist examples smokeping_secrets.dist
config.dist smokemail.dist tmail.dist
[root@C65-A1 etc]# cp -p config.dist /tmp/
[root@C65-A1 etc]# mv config.dist config
[root@C65-A1 etc]# vim config
a. 将“cgiurl = http://some.url/smokeping.cgi”修改为“cgiurl = http://192.168.1.14/smokeping.cgi”
b. 将 *** Database *** 中的“step = 300”修改为"step = 60",每分钟取样一次
step = 300
pings = 20
[root@C65-A1 etc]# chmod 600 /usr/local/smokeping/etc/smokeping_secrets.dist
备注:修改密码文件权限 6、调整apache的配置
[root@C65-A1 etc]# vim /etc/httpd/conf/httpd.conf
添加如下信息:
###set for smokeping###
Alias /cache "/usr/local/smokeping/cache/"
Alias /cropper "/usr/local/smokeping/htdocs/cropper/"
Alias /smokeping "/usr/local/smokeping/htdocs/smokeping.fcgi"
AllowOverride None
Options All
AddHandler cgi-script .fcgi .cgi
AllowOverride AuthConfig
Order allow,deny
Allow from all
AuthName "Smokeping"
AuthType Basic
AuthUserFile /usr/local/smokeping/htdocs/htpasswd
Require valid-user
DirectoryIndex smokeping.fcgi
[root@C65-A1 etc]# cd /usr/local/smokeping/htdocs/
[root@C65-A1 htdocs]# htpasswd -c /usr/local/smokeping/htdocs/htpasswd admin
New password:
Re-type new password:
Adding password for user admin 7、设置smokeping开机启动