Centos安装smokeping教程
Centos安装smokeping教程
一 .安装基本依赖包
ntpdate time.windows.com #64bit
rpm -Uhv http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm #32bit
#rpm -Uhv http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.i686.rpm #install
yum -y install rrdtool fping echoping curl bind-utils
yum -y install httpd
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 gcc wget perl-CPAN perl-devel perl-FCGI perl-CGI rrdtool-perl
二.smokeping编译安装
wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.9.tar.gz
tar zxvf smokeping-2.6..tar.gz
cd smokeping-2.6. ./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty
./configure --prefix=/usr/local/smokeping
/usr/bin/gmake install #copy file
cp /usr/local/smokeping/etc/config.dist /usr/local/smokeping/etc/config
cp /usr/local/smokeping/htdocs/smokeping.fcgi.dist /usr/local/smokeping/htdocs/smokeping.fcgi #create directorys
mkdir -p /usr/local/smokeping/cache /usr/local/smokeping/data /usr/local/smokeping/var
chown -R apache.apache /usr/local/smokeping/cache /usr/local/smokeping/data /usr/local/smokeping/var #create log file
touch /var/log/smokeping.log
chown apache.apache /var/log/smokeping.log
三.配置apache和基本验证
echo 'Alias /cache "/usr/local/smokeping/cache/"
Alias /cropper "/usr/local/smokeping/htdocs/cropper/"
Alias /smokeping "/usr/local/smokeping/htdocs/smokeping.fcgi"
<Directory "/usr/local/smokeping">
AllowOverride None
Options All
AddHandler cgi-script .cgi .fcgi
Order allow,deny
Allow from all
AllowOverride AuthConfig
AuthName "Smokeping"
AuthType Basic
AuthUserFile /usr/local/smokeping/htdocs/htpasswd
Require valid-user
DirectoryIndex smokeping.fcgi
</Directory>' >/etc/httpd/conf.d/smokeping.conf htpasswd -c /usr/local/smokeping/htdocs/htpasswd ca0gu0
#/usr/local/smokeping/bin/smokeping --config=/usr/local/smokeping/etc/config --debug ntpdate time.windows.com
echo "user:passwd" >/usr/local/smokeping/etc/smokeping_secrets.dist
chmod /usr/local/smokeping/etc/smokeping_secrets.dist
chown apache. /usr/local/smokeping/etc/smokeping_secrets.dist
vi /etc/init.d/smokeping
#!/bin/bash
#
# chkconfig:
# Description: Smokeping init.d script
# Hacked by : How2CentOS - http://www.how2centos.com
# Get function from functions library
. /etc/init.d/functions
# Start the service Smokeping
start() {
echo -n "Starting Smokeping: "
/usr/local/smokeping/bin/smokeping --config=/usr/local/smokeping/etc/config --logfile=/var/log/smokeping.log --debug-daemon >/dev/null >&
RETVAL=$?
[ $RETVAL == ] && success $"Smokeping startup"
[ $RETVAL == ] && touch /var/lock/subsys/smokeping
echo
return $RETVAL }
# Restart the service Smokeping
stop() {
echo -n "Stopping Smokeping: "
kill - `ps ax | grep "/usr/local/smokeping/bin/smokeping" | grep -v grep | awk "{ print $1 }"`>/dev/null >&
success $"Smokeping shutdown"
rm -f /var/lock/subsys/smokeping
echo
}
### main logic ###
case "$1" in
start)
start
;;
stop)
stop
;;
status)
if [ -f /var/lock/subsys/smokeping ]; then
echo "Smokeping is runing"
exit
fi
echo "Smokeping is stopped"
exit ;;
restart|reload|condrestart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status}"
exit
esac
exit
chown -R apache.apache /usr/local/smokeping/cache /usr/local/smokeping/data /usr/local/smokeping/var
四.监测节点配置
#64bit
rpm -Uhv http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm #32bit
#rpm -Uhv http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.i686.rpm #install
yum -y install rrdtool fping echoping curl bind-utils
yum -y install httpd
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 gcc wget perl-CPAN perl-devel perl-FCGI perl-CGI rrdtool-perl wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.9.tar.gz
tar zxvf smokeping-2.6..tar.gz
cd smokeping-2.6. ./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty
./configure --prefix=/usr/local/smokeping
/usr/bin/gmake install mkdir -p /usr/local/smokeping/cache chmod /usr/local/smokeping/etc/smokeping_secrets.dist
echo "passwd" >/usr/local/smokeping/etc/smokeping_secrets.dist
vi /etc/init.d/smokeping
#!/bin/bash
#
# chkconfig:
# Description: Smokeping init.d script
# Hacked by : How2CentOS - http://www.how2centos.com
# Get function from functions library
. /etc/init.d/functions
# Start the service Smokeping
start() {
echo -n "Starting Smokeping: "
/usr/local/smokeping/bin/smokeping --master=http://ca0gu0:ca0gu0pass@192.168.66.32:80/smokeping/smokeping.fcgi \
--cache-dir=/usr/local/smokeping/cache \
--shared-secret=/usr/local/smokeping/etc/smokeping_secrets.dist \
--slave-name=user \
--logfile=/var/log/smokeping.log \
--debug-daemon >/dev/null >&
### Create the lock file ###
success $"Smokeping startup"
touch /var/lock/subsys/smokeping
echo
}
# Restart the service Smokeping
stop() {
echo -n "Stopping Smokeping: "
kill - `ps ax | grep "/usr/local/smokeping/bin/smokeping" | grep -v grep | awk "{print $1}"` >/dev/null >&
### Now, delete the lock file ###
rm -f /var/lock/subsys/smokeping
success $"Smokeping shutdown"
echo
}
### main logic ###
case "$1" in
start)
start
;;
stop)
stop
;;
status)
if [ -f /var/lock/subsys/smokeping ]; then
echo "Smokeping is runing"
exit
fi
echo "Smokeping is stopped"
exit
;;
restart|reload|condrestart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status}"
exit
esac
exit
Centos安装smokeping教程的更多相关文章
- Centos安装elasticsearch教程
elasticsearch安装是ytkah在做laravel电商站内搜索要实现的,通过自己的搜索和学习能力不算很费力解决了.下面就整理一下安装elasticsearch教程,服务器是Centos 7, ...
- centos安装smokeping
本文摘自网友博客,并亲自验证 博客地址:https://blog.csdn.net/erica_yue/article/details/78455101 1.安装依赖包: yum install -y ...
- centos安装ss教程
在CentOS 6.6上安装ShadowSocks服务端 1.查看系统[root@localhost ~]# cat /etc/issue CentOS release 6.6 (Final) [ro ...
- CentOS安装Python教程
下载/安装python yum install -y bzip2* #nodejs 0.8.5需要,请安装python前,先安装此模块. wget http://www.python.org/ft ...
- CentOS安装solr 4.10.3
Solr是什么? Solr 是Apache下的一个顶级开源项目,采用Java开发,它是基于Lucene的全文搜索服务器.Solr提供了比Lucene更为丰富的查询语言,同时实现了可配置.可扩展,并对索 ...
- Linux--CentOS 安装 Docker 教程
本文主要介绍 CentOS 系统安装 Docker 的流程. 前提条件 OS 要求 CentOS7: The centos-extras repository must be enabled. Thi ...
- centos 安装 nginx 及配置 的坑
centos 安装 nginx 教程 1.创建/etc/yum.repos.d/nginx. centos 安装 nginx 教程 1.创建/etc/yum.repos.d/nginx.repo to ...
- Centos 6.7 安装smokeping (最完整教程)
本教程需要的源码包一并上传了,届时可以直接上传到linux系统里面! 需要编译的fping.echoping.smokeping源码包,链接:http://pan.baidu.com/s/1pL4HL ...
- Hadoop集群安装配置教程_Hadoop2.6.0_Ubuntu/CentOS
摘自:http://www.powerxing.com/install-hadoop-cluster/ 本教程讲述如何配置 Hadoop 集群,默认读者已经掌握了 Hadoop 的单机伪分布式配置,否 ...
随机推荐
- MVC和MVVM的区别
现在是市面上使用MVVM模型越来越多,相关的前端框架的选择也相应增多. 那么什么是MVVM模型,它和传统MVC模型有什么区别,接下来我们来总结探讨一下. MVVM即Model-View-ViewMod ...
- com.101tec.ZKClient实现中的subscribeDataChanges设置的监听器事件不回调的问题研究
1.如果在Web项目,本身在后台运行,所以注册的事件应该是正常回调的. 2.如果是Application项目,如果是简单的测试,那么运行完之后,整个程序就结束了,程序很快,所以没等到事件回调就关了,解 ...
- Html5离线缓存简介
一. 什么是manifest 首先manifest是一个后缀名为minifest的文件,在文件中定义那些需要缓存的文件,支持manifest的浏览器,会将按照manifest文件的规则,像文件保存在本 ...
- 为什么 Android Studio 工程文件夹占用空间这么大?
为什么 Android Studio 工程文件夹占用空间这么大? 学习了: https://www.cnblogs.com/chengyujia/p/5791002.html
- CentOS和Window互相远程桌面方法
1)VNC服务器配置 (CentOS 5.x安装GNOME桌面环境) # yum groupinstall "GNOME Desktop Environment(CentOS 6.x安装G ...
- Android 录制屏幕的实现方法
Android 录制屏幕的实现方法 Chrome 2017-02-15 15:32:01 发布 您的评价: 5.0 收藏 0收藏 长久以来,我一直希望能够直接从Androi ...
- swift 2.0 语法 字符串
//: Playground - noun: a place where people can play import UIKit /*: 字符串 * OC中的字符串是一个对象, Swift中的字符串 ...
- cacheed 限制 4节点 3000万 es 批量删除 shell脚本练习 elasticsearch_action
文件分割 "www.laiwunews.cn/xinxi/25324717.html""www.zznews.cn/xinxi/10411214.html"&q ...
- 【数学】mex是什么
最近在看博弈论,SG函数,所以什么是mex呢 然后百度了一下得到: mex(S) 的值为集合 S 中没有出现过的最小自然数.例如,mex({1,2}) = 0.mex({0,1,2,3}) = 4
- iOS开发】之CocoaAsyncSocket使用
本文介绍了CocoaAsyncSocket库中GCDAsyncSocket类的使用.粘包处理以及时间延迟测试. 一.CocoaAsyncSocket介绍 CocoaAsyncSocket中主要包含两个 ...