用rysnc同步文件,rsync是一款非常优秀的文件同步管理软件,它也支持多种操作系统平台,在Unix环境中,rsync有着卓绝的功绩。希望这篇文档能对一些朋友有所帮助。
1. 安装
下载地址链接 http://www.samba.org/rsync
shell> tar zxvf rsync-x.x.x.tar.gz
shell> cd rsync-x.x.x
shell> ./configure && make && make install
目前大部分 Unix/Linux 默认即安装了 rsync。
2.配置文件 /etc/rsyncd.conf
shell> touch /etc/rsyncd.conf
shell> vi /etc/rsyncd.conf
修改配置文件 /etc/rsyncd.conf as below:
uid = nobody
gid = nobody
use chroot = no
max connections = 5
pid file = /var/run/rsync.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsync.log
path =
ignore errors
read only = no
list = yes
auth users = username
secrets file = /etc/rsyncd.secrets
3. /etc/rsync.secrets
shell> echo "XXX:password" >>