sersync2大量小文件实时同步

来源:网络 责任编辑:栏目编辑 发表时间:2013-07-02 01:45 点击:

sersync2可以实现一台机器上的某个目录实时同步到多台机器,非常适合大量小文件如web网页。
1. 配置同步目标服务器
# vi /etc/rsyncd.conf
uid = root
gid = root
max connections = 36000
use chroot = no
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
[rsync]         # 同步名
path = /opt/rsync
comment = test files
ignore error = yes
read only = no
hosts allow = 192.168.0.254
hosts deny = *
Note: '/etc/rsyncd.conf' 不存在,要自己创建, 多台目标机器分别进行如上配置。
2. 启动目标服务器rsync准备接收数据
# rsync --daemon
3. 在主服务器上安装配置sersync
# tar xf sersync2.5_64bit_binary_stable_final.tar.gz
# cd GNU-Linux-x86/
# vi confxml.xml, 修改如下行
<sersync>
        <localpath watch="/opt/rsync">  # 本地同步目标
        <remote ip="192.168.0.1" name="rsync"/>  # 目录服务器IP和同步名
        <remote ip="192.168.0.2" name="rsync"/>
</localpath>
4. 运行sersync
# ./sersync2 -d -r

作者“William的记忆碎片”

    相关新闻>>

      发表评论
      请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
      用户名: 验证码:点击我更换图片
      最新评论 更多>>

      推荐热点

      • /etc/fstab 详解
      • nginx主主集群
      •  LVS-NAT和LVS-DR模式的实现详解
      •  RHCE考试之磁盘配额
      • 学习笔记:ACL详解
      • suse linux双网卡双网关配置
      •  LVM逻辑卷管理器
      •  Nginx主主负载均衡架构
      • ubuntu学习Mysql

      快速直达

      操作系统导航

      LinuxWindows虚拟机
      网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
      Copyright © 2008-2015 计算机技术学习交流网. 版权所有

      豫ICP备11007008号-1