angelcai1986 发表于 2011-9-28 13:30:40

用sersync进行实时同步数据 (1)

  同步目标服务器
  Vim /etc/rsyncd.conf
uid=rootgid=rootmax connections=36000use chroot=no log file=/var/log/rsyncd.logpid file=/var/run/rsyncd.pidlock file=/var/run/rsyncd.lock   path=/data0/webcomment=McShell webignore errors = yesread only = no hosts allow =10.1.0.0/24hosts deny = *
编辑完之后执行rsync –daemon 开启守护进程
剩下的服务器都一样配置。

同步服务器的confxml.xml如下

<?xml version="1.0" encoding="ISO-8859-1"?> <head version="2.2">   <host hostip="10.1.0.2" port="8008"></host>   <filter start="false">         <exclude expression="(.*)\.gz"></exclude>         <exclude expression="^info/*"></exclude>   </filter>   <sersync>         <localpath watch="/data0/web " debug="false">             <remote ip="10.1.0.4" name="web"/>             <remote ip="10.1.0.5" name="web"/>             <remote ip="10.1.0.6" name="web"/>                <!--<remote ip="192.168.8.39" name="tongbu"/>-->         </localpath>            <rsyncauth start="flase" users="www" passwordfile="/etc/rsync.pas"/>         <crontab start="false" schedule="600">             <crontabfilter start="false">               <exclude expression="*.php"></exclude>               <exclude
本文由:SKF轴承 http://wwww.9-zc.com 整理发布
页: [1]
查看完整版本: 用sersync进行实时同步数据 (1)