1.安装rsync服务
yum install -y rsync
2.修改配置文件 /etc/xinetd.d/rsync 将disable=yes 改为no 开启服务
service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
3.创建服务器配置文件 /etc/rsyncd.conf
全局参数
uid = root //运行RSYNC守护进程的用户
gid = root //运行RSYNC守护进程的组
use chroot = no //不使用chroot
max connections = 4 // 最大连接数为4
timeout = 600 //超时时间
strict modes =yes //是否检查口令文件的权限
port = 873 //默认端口873
pid file = /var/run/rsyncd.