摘要: 实现思路:将两个redis-server作为后端,然后通过haproxy做为负载均衡器,每个redis-server的机器上配置配置一个用于健康检查的shell,并通过xinetd将这个shell设置为服务监听9981端口并进行管理。haproxy通过redis-server机器上的9981端口进行健康检查,如果检查失败,就直接移除该redis-server,恢复后又自动添加haproxy.confglobal maxconn 2# debug quiet user zhxia group zhxia nbpro... 阅读全文
posted @ 2012-11-13 09:31 涛光 阅读(7975) 评论(0) 推荐(0) 编辑
摘要: inotity-tools是用于监视linux文件系统变化的工具,非常适合于一些要求实时同步的场合,在linux内核为2.6.13版本以上的内核才支持,使用uanme -r 查看,我使用的是ubuntuzhxia@ubuntu-zhxia:/var/www/test$uname-r2.6.35-22-generic-pae首先安装inotify-tools,可以自行下载源码包安装,但我使用ubuntu的apt-get方式安装sudoapt-getinstallinotify-tools一下shell是将 /var/www目录同步到 /tmp/下 #!/bin/bashsrc=/var/wwwd 阅读全文
posted @ 2012-11-13 09:27 涛光 阅读(848) 评论(0) 推荐(0) 编辑
摘要: shell:#!/bin/bash#==========================================================# this example show you how to get data from pipe#========================... 阅读全文
posted @ 2012-11-13 09:27 涛光 阅读(270) 评论(0) 推荐(0) 编辑