rsync共享配置


服务端配置

[root@server ~]# yum -y install xinetd rsync

[root@server ~]# chkconfig --level 35 xinetd on

[root@server ~]# mkdir /data/rsync

[root@server ~]# vim /etc/xinetd.d/rsync

disable = no

[root@server ~]# vim /etc/rsyncd.srt

user01:password

[root@server ~]# vim /etc/rsyncd.conf

secrets file = /etc/.rsyncd.srt

read only = yes

list = yes

uid = nobody

gid = nobody

[log]

comment = download log

path = /data/rsync

auth users = rsync

host allow = 192.168.0.1  192.168.1.1

auth users = user01

[root@server ~]# chmod 600 /etc/rsyncd.srt

[root@server ~]# iptables -I INPUT 9 -s 192.168.1.1 -p tcp -m state --state NEW -m tcp --dport 873 -j ACCEPT

[root@server ~]# iptables -I INPUT 9 -s 192.168.0.1 -p tcp -m state --state NEW -m tcp --dport 873 -j ACCEPT

[root@server ~]# service xinetd start

 

 

 

客户端配置

[root@client ~]# vim /tmp/rsyncd.pass

[root@client ~]# chmod 600 /tmp/rsyncd.pass

[root@client ~]# rsync -avzP  --password-file=/tmp/rsyncd.pass  [email protected]::log/daily/login* /path





你可能感兴趣的:(linux,rsync,rysncd)