1 安装
#tar zxvf rsync-2.6.9.tar.tar
#cd rsync-2.6.9
#./configure&&make && make install
2 配置
#vi /etc/rsyncd.conf
uid = root
gid = root
max connections = 10
timeout = 1800
use chroot = yes
hosts allow =192.168.1.0/24 (准许访问的ip地址段)
syslog facility = local7
pid file = /etc/rsyncd.pid
log file = /var/log/rsyncd.log
secrets file = /etc/rsyncd.secrets (加密问件,可以不用管)
list = no
[test] #(模块)
path = /tmp/test/
ignore errors
read only = false
3 启动
#/usr/bin/rsync --config=/etc/rsyncd.conf --daemon
(把这条命令写入/etc/rc.local,服务器重启时,rsync服务自动启动)
4客户端测试
#rsync -auvz --timeout=600 /tmp/test/a.txt 192.168.1.171::test/