Apache Replication master-slave Replication and synchronization mechanism

Source: Internet
Author: User

Apache Replication master-slave Replication and synchronization mechanism
Apache Replication master-slave Replication and synchronization mechanism

1. Apache is installed on both servers.
Apt-get install apache2
2. Rsync is installed on both servers.
Apt-get install rsync
3. Use cron in ServerA for planning
Crontab-e
Enter the editing mode, and enter the following content, which means synchronization is performed every 5 minutes.
*/5 * rync-avzhe ssh [email protected]:/var/www // var/www/
4. Modify the/var/www/index.html content of ServerB.
5. Check that the content of/var/www/index.html of ServerA is updated to the same content as that of ServerB.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.