Rsync static files synchronize files on server A to server B and server C. The rsync server has the following settings: (rsync installation is omitted) configure rsync on server A as follows: 1. install the rsync service, check that the rsync service command is ps-ef | greprsync, and The rsync command is rsync -... rsync static files synchronize files on server A to server B and server C. The rsync server has the following settings: (rsync installation is omitted) configure rsync on server A as follows: 1. install the rsync service, check that the rsync command is ps-ef | grep rsync, and The rsync command is rsync -- daemon ., 2,/etc/rsyncd. the conf file is configured as follows: (rsync. manually create the conf file) uid = root gid = root use chroot = no max connections = 20 log file =/var/log/rsyncd. log # lock file =/var/run/rsync. lock syslog facility = local5 pid file =/var/run/rsyncd. pid [wwwroot] path = synchronous file path strength comment = wwwroot mapping jlWW WEB hosts allow = B, C server IP 3: Start Service: rsync -- daemon check whether to start: ps-ef | grep rsync if The rsync -- daemon process appears, the startup is successful. 4: Configure on server B and server C: create websync under root. sh edit: rsync-vzrtopg -- delete A server IP: synchronize folder name synchronize folder to that path annotation: v is verbose, z is compressed, topg is the original property of the file (owner, time parameter ). -- Delete: if the server deletes this file, the corresponding file 5 will be deleted for the segment change. execute crontab-e to edit: */2 */root/websync. sh 6: execute crontabl-l. if error: 1 occurs, check rsync. config and websync. whether sh has the execution permission. 2: edit vi/etc/service input rsync 873/tcp and rsync 873/udp 3: Check the configuration file for incorrect symbols and spelling errors.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.