rsync服务器安装配置
#rsync指定端口号(10002)
1 rsync -e 'ssh -p 10002'
1 rsync (server -- client) 2 #2014-3-3 3 4 -----------server------------------------------ 5 6 yum install rsync 7 8 vim /etc/xinetd.d/rsync 9 10 disable = no 11 12 mkdir -p /mirror/PDD 13 chown nobody:nobody /mirror/PDD 14 15 vim /mirror/rsyncd.conf 16 17 port = 873 18 use chroot = no 19 max connections = .. 20 pid file = /var/run/rsyncd.pid 21 lock file = /var/run/rsync.lock 22 log file = /var/log/rsyncd.log 23 log format = %t [%p] %o %h [%a] %m (%u) %f %l 24 motd file = /var/log/rsyncd.motd 25 26 [PDD] 27 path = /mirror/PDD 28 comment = PDD 29 ignore errors 30 read only = false 31 list = false 32 auth users = mirroruser 33 host allow = .. 34 secrets file = /etc/rsyncd.secrets 35 36 vim /etc/rsyncd.secrets 37 38 user:passwd 39 40 chmod 600 /etc/rsyncd.secrets 41 42 rsync --daemon --config=/mirror/rsyncd.conf 43 44 ------------client------------------------------------------------------------- 45 46 yum install rsync 47 48 vim /root/rsyncClient.passwd 49 50 passwd 51 52 chmod 600 /root/rsyncClient.passwd 53 54 rsync --vzrt --password-file=/root/rsyncClient.passwd filepath mirror@ip::PDD 55 56 -------------------------------------------------------------------------------