rsync的安装与配置记录

Posted by

1:安装rsync:

yum install rsync

2:

修改配置文件:

vi /etc/rsyncd.conf

uid = root
gid = root
use chroot = no
max connections = 0
list = no
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log

[test]
path = /data/wwwroot/test
ignore errors
read only = no

启动rsyncd服务
/usr/local/bin/rsync –daemon
rsync默认服务端口为873
加入rc.local
编辑/etc/rc.d/rc.local,在最后添加:
/usr/local/bin/rsync –daemon

3、运行:

rsync -av /test/ rsync://192.168.41.14/test/

Leave a Reply