vim /tec/rsync.conf

port = 8730

log file=/var/log/reync.log

pid file=/var/run/rsync.pid


[aming]

path=/tmp/rsync

use chroot = yes

max connections=4

read only = yes

list=yes

uid=root

gid=root

auth users=aming

secrets file=/etc/rs.passwd

hosts allow=192.168.11.190


[aming1]

path=/tmp/rsync123

use chroot=yes

max connections=4

read only =yes

list=yes

uid=root

gid=root

hosts allow =192.168.11.180


配置文件结束

启动 rsync --daemon

查看服务:ps aux | grep rsync

netstat -lnp

创建日志文件

cat /var/log/rsync.log

查看另一个服务器的8730端口能不能正常使用

telnet 192.168.11.16 8730

按ctrl + ] 停止,再输入quit退出

修改密码文件

vim /etc/rs.passwd

aming:123aaa

修改权限只允许自己看

chmod 400 /etc/rs.passwd