Achieve the goal:
The/var/www/sw_service directory on the 172.16.1.64 server is synchronized with the/var/www/sw_service directory on the 172.16.1.60 server,
i.e. 1.60 Active to 1.64 sync
Environment configuration:
Server-->172.16.1.64/var/www/sw_service
Client-->172.16.1.60/var/www/sw_service
Application Deployment:
First, server segment configuration
1, rsync system comes with, need to use--deamon way to start, the service port is TCP 873
2, Vim/etc/xinetd.d/rsync modified disable =yes for disable =no, the modified file as follows
3,/etc/init.d/xinetd restart restart xinted service
4. Edit the main configuration file 1122.www.qixoo.qixoo.com/etc/rsyncd.conf This file needs to be created by itself
5. Edit the server's password file/etc/backup.pass
6, chmod 600/etc/backup.pass
Second, the client configuration is as follows
1. Edit the password file of rsync connection/etc/rsync_client.pass
2, chmod 600/etc/rsync_client.pass
3. Use the rsync command to connect to the server for file synchronization
The server-side file has not changed since it was previously synchronized, so it is out of sync.
4. Write Synchronization scripts
5, add to the scheduled task crontab
* * * * */root/.web_rsync.sh >/dev/null 2>&1
6. Restart the Crond service
The entire configuration is complete.
This article is from the "" blog, please make sure to keep this source
The realization of the directory synchronization function of the Linux rsync website