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
read only =yes
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
本文轉自 a928154159 51CTO部落格,原文連結:http://blog.51cto.com/zhibeiwang/1829452