First, the basic knowledge
Rsync is divided into server-side, client-side, server-building than the client hard (and very simple).
The rsync server is the server that runs the rsync service in Deamon mode and needs to open the Rsync deamon and start the xinetd service. Default Port 873.
The rsync client is the server that initiates the rsync connection and installs rsync.
After the Rsync client initiates the connection, the Rsync server checks that the Rsync client submits the user name and password built into the rsync server correctly, and if the authentication is detected, the file transfer is started, and the transfer process is based on the requirements of the file size, attributes, permissions, MD5 values, etc. If the file information on both ends is inconsistent, synchronize the difference blocks of the file as required.
Second, installation
Most Linux operating systems have their own rsync service, and if you want to upgrade you can use Yum, you can also use the source package to install it yourself.
wget https://download.samba.org/pub/rsync/rsync-3.1.2.tar.gztar -xzf rsync- 3.1. 2. Tar . GZCD rsync-3.1. 2 . /configure--prefix=/usr/local/rsyncdmake make andinstall
Third, service-side configuration
The Rsync profile is installed and sometimes does not exist, do not panic, you can create it manually. Create the configuration file directory and file as follows:
| -/ETC/RSYNCD (folder)
| -rsyncd.conf (rsync server configuration file)
| -Rsyncd.secrets (user password file, the client uses the account password to access, requires 600 permissions)
| -RSYNCD.MOTD (the server information that is displayed after the user logs in is not much used)
mkdir /etc/rsyncdtouch /etc/rsyncd/rsyncd.conftouch /etc/rsyncd/ Rsyncd.secretsTouch /etc/rsyncd/rsyncd.motdchmod /etc/rsyncd/ Rsyncd.secrets
Four, start the service side
/usr/local/rsync/bin/rsync--daemon
Five
Linux-rsync Server Building Combat