1 安装软件包
yum install rsync -y
yum install xinetd -y

2 配置rsync自动启动
chkconfig rsync on

3 /etc/rsyncd.conf配置设置

pid file = /var/run/rsyncd.pid
uid = root
gid = root
use chroot = yes
read only = no
motd file = /etc/rsyncd/rsyncd.motd
#transfer logging = yes
#log file = /var/log/rsync.log

[data]
path = /data/data
auth users = data
secrets file = /etc/rsyncd/rsyncd.secrets
ignore errors

4 /etc/rsyncd/rsyncd.motd配置欢迎信息

++++++++++++++++++++++++++++++++++++++++++++++++
+                                              +
+   Welcome to use the wzh.pw rsync services   +
+                                              +
++++++++++++++++++++++++++++++++++++++++++++++++

5 /etc/rsyncd/rsyncd.secrets配置帐号密码
chmod 600 /etc/rsyncd/rsyncd.secrets设置权限

data:passwod

6 重启rsync服务
service xinetd restart

Last modification:May 11th, 2019 at 11:39 pm
如果觉得我的文章对你有用,请随意赞赏