Step 1: Copy the tar package
tar -xf rsync-3.1.2.tar.gz
Step 2: Load the configuration file
cd rsync-3.1.2
./configure --prefix=/usr
Step 3: Compile and install
make && make install
The above three steps are super simple, no need to say much for a programmer.
You need to mkdir three configuration files in the /etc directory
rsyncd.conf core configuration file
rsyncd.pass Interaction between cluster machines requires password access
rsyncd.motd starts successfully and returns the effect of the console
----------------------------rsyncd.conf------start---------------------------------
uid = root
gid = root
strict modes = no
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
[sharehtml]
path = /data/html/
ignore errors=no
read only = no
write only = no
list = false
auth users = root
secrets file = /etc/rsync.pass
----------------------------rsyncd.conf------end---------------------------------
Password file, with certain format control (username:password)
Note: This file requires 600 permissions
chmod 600 /etc/rsync.pass
----------------------------rsyncd.pass------start--------------------------------
root:123456
----------------------------rsyncd.pass------end---------------------------------
----------------------------rsyncd.motd------start---------------------------------
welcome to rsyncd
----------------------------rsyncd.motd------end---------------------------------
Start the rsync program
/usr/bin/rsync --daemon --config=/etc/rsync.conf