帝王 发表于 2018-10-19 07:52:15

linux sync server+inotify 1对多同步实例

vim /etc/rsyncd.conf  
uid = root      #运行RSYNC守护进程的用户
  
gid = root      #运行RSYNC守护进程的组
  

  
port = 873          #监听端口
  
use chroot = no   #不使用chroot
  
max connections = 100   #最大连接数,0为不限制
  

  
timeout = 600      #通过该选项可以覆盖客户指定的IP超时时间.通过该选项可以确保rsync服务器不会永远等待一个崩溃的客户端.超时单位为秒钟,0表示没有超时定义,这也是默认值.对于匿名rsync服务器来说,一个理想的数字是600.
  
pid file = /var/run/rsyncd.pid
  
lock file = /var/run/rsyncd.lock
  
log file = /var/log/rsyncd.log
  
#log format --- google
  

  

  
path = /data/ccms-build/       #需要同步的路径
  
comment =ccms dir         #名称
  
ignore errors                #可以忽略一些无关的IO错误
  
read only = no
  
list = no                      #不允许列文件
  
hosts allow = 192.168.***.***/255.255.255.0       #允许的客户端
  
auth users = ccms                   #认证用户
  
secrets file = /etc/rsync.pwd       #密码文件:600
  

  
vim /etc/rsync.pwd
  
ccms:********    #同server端相同
  

  
chmod 600 /etc/rsync.pwd


页: [1]
查看完整版本: linux sync server+inotify 1对多同步实例