#打开vi /etc/default/rsync
RSYNC_ENABLE=true #false改true
cp /usr/share/doc/rsync/examples/rsyncd.conf /etc
pid file=/var/run/rsyncd.pid
#vi /etc/rsyncd.secrets
rsyncuser:your_secure_password_123
chmod 600 /etc/rsyncd.secrets
chown root:root /etc/rsyncd.secrets
systemctl enable --now rsync
systemctl status rsync
如果未自动启动,手动运行:
rsync --daemon --config=/etc/rsyncd.conf