http://liubao0312.blog.51cto.com/2213529/1677586

配置搞定,参照上面的文章,用时搞一搞就OK。

注意IPTABLES的配置及环境变量

最简陋配置:

rsync server端(需要从服务器同步过来)

#Rsync server
uid = root
gid = root
use chroot = no
max connections = 2000
timeout = 600
pid file =/var/run/rsyncd.pid
lock file =/var/run/rsync.lock
log file = /var/log/rsyncd.log
ignore errors
read only = false
list = false
hosts allow = 172.x.x.0/24, 10.x.x.0/24
hosts deny = 0.0.0.0/32
auth users = rsync_backup
secrets file =/etc/rsync.password
#################################################
[www-uploadImage]
comment = www upload image rsync
path = /home/xxx/test/
#################################################
#rsync_config____________end

/usr/local/sersync/confxml.xml (作为源,同步的文件,用inno检测变化,用rsync客户端同步到服务器)

<?xml version="1.0" encoding="ISO-8859-1"?>
<head version="2.5">
    <host hostip="localhost" port="8008"></host>
    <debug start="false"/>
    <fileSystem xfs="false"/>
    <filter start="false">
    <exclude expression="(.*)\.svn"></exclude>
    <exclude expression="(.*)\.gz"></exclude>
    <exclude expression="^info/*"></exclude>
    <exclude expression="^static/*"></exclude>
    </filter>
    <inotify>
    <delete start="true"/>
    <createFolder start="true"/>
    <createFile start="false"/>
    <closeWrite start="true"/>
    <moveFrom start="true"/>
    <moveTo start="true"/>
    <attrib start="false"/>
    <modify start="false"/>
    </inotify>

    <sersync>
    <localpath watch="/usr/local/apache-tomcat/x/x/uploadFile">
        <remote ip="47.x.x.x" name="www-uploadImage"/>
        <!--<remote ip="192.168.8.40" name="tongbu"/>-->
    </localpath>
    <rsync>
        <commonParams params="-artuz"/>
        <auth start="true" users="rsync_backup" passwordfile="/etc/rsync.password"/>
        <userDefinedPort start="false" port="874"/><!-- port=874 -->
        <timeout start="true" time="100"/><!-- timeout=100 -->
        <ssh start="false"/>
    </rsync>
    <failLog path="/usr/local/sersync/logs/rsync_fail_log.sh" timeToExecute="60"/><!--default every 60mins execute once-->
    <crontab start="false" schedule="600"><!--600mins-->
        <crontabfilter start="false">
        <exclude expression="*.php"></exclude>
        <exclude expression="info/*"></exclude>
        </crontabfilter>
    </crontab>
    <plugin start="false" name="command"/>
    </sersync>

    <plugin name="command">
    <param prefix="/bin/sh" suffix="" ignoreError="true"/>    <!--prefix /opt/tongbu/mmm.sh suffix-->
    <filter start="false">
        <include expression="(.*)\.php"/>
        <include expression="(.*)\.sh"/>
    </filter>
    </plugin>

    <plugin name="socket">
    <localpath watch="/opt/tongbu">
        <deshost ip="192.168.138.20" port="8009"/>
    </localpath>
    </plugin>
    <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>
</head>

最新文章

  1. js之认识闭包
  2. SSH遇见的问题
  3. iOS多线程学习及总结
  4. hdu.1111.Secret Code(dfs + 秦九韶算法)
  5. Spring Bean配置2
  6. 如何做好多语言(小语种)网站SEO
  7. Python学习笔记6-字典
  8. hdoj 5349 MZL&#39;s simple problem
  9. SlidingMenu+ViewPager实现侧滑菜单效果
  10. 【POJ 1679 The Unique MST】最小生成树
  11. MVC之Ajax
  12. base库--- 一个应用JS
  13. JS中都有哪些数据类型呢?
  14. 关于SQL经典题
  15. httpClient4.5 closeableHttpClient用法
  16. 【转】理解WebKit和Chromium: JavaScript引擎简介
  17. 向量的L2范数求导
  18. windows查看注册表
  19. yii2 mysql根据多个字段的数据计算排序
  20. 使用postman做接口测试(二)

热门文章

  1. 《Cracking the Coding Interview》——第17章:普通题——题目4
  2. activiti并发多实例子流程任务处理
  3. day06_08 字符串
  4. c++知识点总结--静态与动态类型
  5. django QuerySet 的常用API
  6. 台州学院maximum cow训练记录
  7. [UOJ#131][BZOJ4199][NOI2015]品酒大会
  8. 性能优化-FSL(Force Synchronous Layout)强制同步布局
  9. ACMUniversity
  10. Avito Cool Challenge 2018 :E. Missing Numbers