默认情况Ubuntu安装了rsync服务,但在/etc下没有配置文件,一般情况可以copy示例文件到/etc下
#cp /usr/share/doc/rsync/examples/rsyncd.conf /etc
vi /etc/rsyncd.conf
log file=/var/log/rsyncd
[test]
read only = yes
timeout = 300
lock file = /var/lock/rsyncd
secrets file = /etc/rsyncd.pass
list=yes
max connections = 4
hosts allow=192.168.137.102
hosts deny=*
path =/install/test
vi /etc/rsyncd.pass
user:password
启动
rsync --daemon
验证
lsof -i:873
其他机器上执行同步
rsync -auqz password@192.168.137.101::test /install/test2
#cp /usr/share/doc/rsync/examples/rsyncd.conf /etc
vi /etc/rsyncd.conf
log file=/var/log/rsyncd
[test]
read only = yes
timeout = 300
lock file = /var/lock/rsyncd
secrets file = /etc/rsyncd.pass
list=yes
max connections = 4
hosts allow=192.168.137.102
hosts deny=*
path =/install/test
vi /etc/rsyncd.pass
user:password
启动
rsync --daemon
验证
lsof -i:873
其他机器上执行同步
rsync -auqz password@192.168.137.101::test /install/test2