跟之前3.1.0版本有些变化,作为记录。
官方文档:https://download.samba.org/pub/rsync/INSTALL
# 服务端安装
wget -c https://download.samba.org/pub/rsync/src/rsync-3.2.7.tar.gz tar zxvf rsync-3.2.7.tar.gz cd rsync-3.2.7/ yum -y install gcc gcc-c++ gawk autoconf automake python3-pip openssl-devel acl libacl-devel attr libattr-devel xxhash-devel libzstd-devel lz4-devel ./configure --prefix=/usr/local/rsync make make install
# 配置文件
[root@database02 data]# cat /etc/rsyncd.conf trict modes = yes uid = root gid = root port = 873 hosts allow = 114.114.114.114 hosts deny = 0.0.0.0/32 use chroot = no max connections = 1000 timeout = 10 pid file = /var/run/rsyncd.pid lock file = /var/run/rsync.lock log file = /var/log/rsyncd.log # 发布项目 [test] path = /data/ ignore errors read only = no write only = no list = no auth users = root secrets file = /etc/rsync.passwd
# 认证文件
[root@database02 data]# cat /etc/rsync.passwd root:123321 # 修改权限,否则客户端输入密码后会提示auth failed [root@database02 data]# chmod 600 /etc/rsync.passwd
# 启动
[root@database02 data]# /usr/local/rsync/bin/rsync --daemon
原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/5243.html