快速业务通道

sersync 同步文件

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-07

Sersync 文件镜像同步

192.168.1.229上配置如下:

rpm -q rsync

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

[benet]
path=/data/web/benet
comment = xoyo video files
ignore errors = yes
read only = no
hosts allow = 192.168.1.228/24
hosts deny = *

[accp]
path=/data/web/accp
comment = xoyo video files
ignore errors = yes
read only = no
hosts allow = 192.168.1.228/24
hosts deny = *

开启rsync守护进程rsync --deamon

192.168.1.228上配置如下:

tar zxvf sersync2.5beta1_32bit_binary.tar.gz

cd GNU-Linux-x86

cp confxml.xml confxml2.xml

vi confxml.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<head version="2.4">
<host hostip="localhost" port="8008"></host>
<filter start="false">
<exclude expression="(.*).gz"></exclude>
<exclude expression="^info/*"></exclude>
</filter>
<inotify>
<delete start="true"/>
</inotify>
<sersync>
<localpath watch="/opt/benet" debug="false">
<remote ip="192.168.1.229" name="benet"/>
<!--<remote ip="192.168.8.39" name="tongbu"/>-->
<!--<remote ip="192.168.8.40" name="tongbu"/>-->
</localpath>
<rsync>
<auth start="false" users="root" passwordfile="/etc/rsync.pas"/>
</rsync>
<crontab start="false" schedule="600">
<crontabfilter start="false">
<exclude expression="*.php"></exclude>
<exclude expression="info/*"></exclude>
</crontabfilter>
</crontab>
<plugin start="false" name="refreshCDN"/>
</sersync>


<plugin name="refreshCDN">
<localpath watch="/data0/htdocs/cms.xoyo.com/site/">
<cdninfo domainname="ccms.chinacache.com" port="80" username="xxxx" passwd="xxxx"/>
<sendurl base="http://pic.xoyo.com/cms"/>
<regexurl regex="false" match="cms.xoyo.com/site([/a-zA-Z0-9]*).xoyo.com/images"/>
</localpath>
</plugin>
<plugin name="socket">
<localpath watch="/opt/tongbu">
<deshost ip="192.168.138.20" port="8009"/>
</localpath>
</plugin>
</head>

vi confxml2.xml


<?xml vers

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号