Because the system installs the rsync service by default, I will omit how to install the rsync installation server: mkdir-p/etc/rsyncd/Create The rsync main directory touch/etc/rsyncd. conf creates the master configuration file touch/etc/rsyncd. secrets create rsync letter...
Since the rsync service is installed by default, I will omit how to install rsync.
Server installation:
Mkdir-p/etc/rsyncd/create rsync main directory
Touch/etc/rsyncd. conf
Touch/etc/rsyncd. secrets create rsync information
Chmod 600/etc/rsyncd. secrets modify permissions
Touch/etc/rsyncd. motd create rsync instructions
Ls-lh/etc/rsyncd. secrets create a connection
Vi/etc/rsyncd. secrets modify account information
Xiaolu: 123456 username and password (no system account required)
Vi/etc/rsyncd. conf modify the main configuration file
Pid file =/var/run/rsyncd. pid is written into the pid of the process.
Port = 873 port number
Address = 192.168.20.167 server IP address
Uid = root
Gid = root
Use chroot = yes
Read only = yes permission read-only
Hosts allow = * allow all
Motd file =/etc/rsyncd. motd
Timeout = 300 timeout
Transfer logging = yes
Log file =/var/log/rsync. log access log location
[Log] Alias (used to synchronize the rsync directory)
Path =/qq synchronization folder location
List = yes
Ignore errors ignores io errors
Auth users = xiaolu authenticated user
Secrets file =/etc/rsyncd. secrets user password
Exclude = error_log httpd. pid exclude non-synchronization
/Usr/bin/rsync -- daemon -- config =/etc/rsyncd. conf
Client configuration:
Mkdir/etc/rsyncd/create rsync Directory
Touch rsyncd. password to create a password file
Echo "123456"> rsyncd. password append password
Rsync-avP -- password-file = rsyncd. password xiaolu@192.168.20.167: log/qq/
-- Password-file = rsyncd. password Manual synchronization command
Task plans can be made for regular synchronization !!!
Rsync configuration notes!
Writing is very fast, not very detailed!
This article is from the blog "flying birds with wings"