Centos 6.3 already comes with rsync service
Installing XINETD
# yum-y Install xinetd
Edit the/etc/xinetd.d/rsync file and change disable = yes to disable = no
FTP server, as it # allows CRC checksumming Etc.service rsync{ = no flags = IPv6 Socket_type = stream wait = no user = root Server =/usr/bin/rsync server_args =--daemon log_on_failure + = USERID}
rsync
Start xinetd
#/etc/init.d/xinetd Start
Edit/etc/rsyncd.conf, set up rsync service
# vi/etc/rsyncd.conf
Max connections =2Lockfile=/var/run/Rsync.locklogfile=/var/log/Rsyncd.logpidfile=/var/run/Rsyncd.pidtimeout= -[down] #模块名 comment=Web Files Sync Path=/home/website.com/public_html #同步目录 Ignore errors read only=Yes #只读 prevents the client from modifying the list=Yes UID=Nobody gid=Nobody auth users=Downsync #允许连接的用户名 Secretsfile=/etc/rsyncd.secrets #密码文件 hosts allow=192.99.0.0/255.255.0.0#允许连接的网段, after adding a server, you need to add a new server network segment, or you will not be able to synchronize [upload] comment=Web Files Upload Path=/home/website.com/public_html Ignore errors read only=falseList=Yes UID=Root GID=Root Auth users=Uploadsync Secretsfile=/etc/rsyncd.secretsup
rsyncd.conf
Edit Password file
# vi/etc/rsyncd.secrets
downsync:password# User name: password
Add the correct permissions to the password file
# chmod 600/etc/rsyncd.secrets
Rsync Server-side configuration