Sersync+inotify+rsync synchronizing data between different hosts

Source: Internet
Author: User
Tags inotify rsync

Keep the same/www/mingxiao data in 192.168.1.5 and 192.168.1.6

Here are two ways to achieve this, please refer to my other blog post: http://mingxiao.blog.51cto.com/8124243/1641385


Into 192.168.1.5

Installing Sersync and INotify

# yum Install inotify-tools# tar xf sersync2.5.4_64bit_binary_stable_final.tar.gz-c/usr/local/sersync# cd/usr/local/ Sersync


edit confxml.xml 


Edit/etc/rsync.pass, add the following:

Xiaoming
#chmod 600/etc/rsync.pass


Into 192.168.1.6

# Useradd xiaoming# echo xiaoming | passwd--stdin Xiaoming


Provide the configuration file for rsync, edit/etc/rsyncd.conf

Uid=nobodygid=nobodyuse chroot = Nomax connections =10strict modes = yespid File =/var/run/rsyncd.pidlock File =/var/run /rsync.locklog file =/var/log/rsyncd.log[xiaoming]path =/www/mingxiaocomment = Xiaoming Fileignore errorsread only = Now Rite = nohost Allow = 192.168.1.5list = Falseuid = Rootgid = Rootauth user = Xiaomingsecrets File =/etc/server.pass


Edit/etc/server.pass

Xiaoming
# chmod 600/etc/server.pass
#chkconfig rsync on# Service xinetd start


Into 192.168.1.5

/usr/local/sersync/sersync2-r-o/usr/local/sersync/confxml.xml-n 5-d



The configuration is complete at this time.

This article is from the "on the Road" blog, please be sure to keep this source http://mingxiao.blog.51cto.com/8124243/1641387

Sersync+inotify+rsync synchronizing data between different hosts

Related Article

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.