服务端配置
[[email protected] ~]# yum
-y install xinetd rsync
[[email protected] ~]#
chkconfig --level 35 xinetd on
[[email protected] ~]#
mkdir /data/rsync
[[email protected] ~]# vim
/etc/xinetd.d/rsync
disable = no
[[email protected] ~]# vim
/etc/rsyncd.srt
user01:password
[[email protected] ~]# 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
[[email protected] ~]#
chmod 600 /etc/rsyncd.srt
[[email protected] ~]#
iptables -I INPUT 9 -s 192.168.1.1 -p tcp -m state --state NEW -m tcp --dport
873 -j ACCEPT
[[email protected] ~]#
iptables -I INPUT 9 -s 192.168.0.1 -p tcp -m state --state NEW -m tcp --dport
873 -j ACCEPT
[[email protected]
~]# service xinetd start
客户端配置
[[email protected] ~]# vim
/tmp/rsyncd.pass
[[email protected] ~]#
chmod 600 /tmp/rsyncd.pass
[[email protected]
~]# rsync -avzP --password-file=/tmp/rsyncd.pass [email protected]::log/daily/login* /path