lsyncd ½Ç½Ã°£ µ¿±âÈ
https://www.ehostidc.co.kr/cscenter/technical.php?ptype=view&idx=271&¡¦ (493)https://www.ehostidc.co.kr/cscenter/consulting.php (432)
Lsycnd server: x.x.x.107
Lsyncd client: x.x.x.108160;
160;
1) Client rsync160;설치160;
yum install -y rsync xinetd
160;
2) Client rsync160;설1221;160;
vi /etc/rsyncd.conf
[SYNC]160;
comment = web_02 (hostname)160;
path=/var/www/html (path)
hosts allow = x.x.x.107 (lsyncd server IP)160;
uid = 0160;
gid = 0
use chroot = yes160;
read only = no
160;
3) Client iptables160;설1221; 0143; 1201;용160;
vi /etc/sysconfig/iptables
-A INPUT -m state --state160;NEW -m udp -p udp --dport 873 -j ACCEPT160;
-A INPUT -m state --state NEW -m tcp -p tcp --dport 873 -j ACCEPT160;
wq!
service160;iptables restart
160;
4) Client rsyncd160;설1221; 0143; 확1064;160;
service xinetd restart
chkconfig160;xinetd on
160;
5) Server lsyncd160;설치160;
Yum install R11;y lsyncd
160;
6) Server ssh160;1064;1613;Ȗ12; 생성 0143; 1060;ᇼ1;
Ssh-keygen
cp160;/root/.ssh/id_rsa.pub /root/
160;
7) ssh160;1217;속 테스트160;
8) Server lsync160;설1221;160;
vi /etc/lsyncd.conf
settings {160;
160; 160; 160; 160;160;logfile =160;"/var/log/lsyncd/lsyncd.log",
160; 160; 160; 160;160;statusFile =160;"/var/log/lsyncd/lsyncd-status.log",160;
160; 160; 160; 160;160;statusInterval = 20
160;160; 160;160;}160;
sync {160;
160; 160;160;default.rsync,
160; 160;160;source="/var/www/html",160;
160; 160;160;target="x.x.x.108:/var/www/html",
160; 160;160;delay = 1,160;
160; 160;160;rsync = {
160; 160; 160; 160; 160;compress = true,160;
160; 160; 160; 160; 160;acls = true,
160; 160; 160; 160; 160;verbose = true,160;
160; 160; 160; 160; 160;rsh = "/usr/bin/ssh -p 22 -o160;StrictHostKeyChecking=no" }
160;}
160;
9) Server iptables160;설1221; 0143; 1201;용160;
vi /etc/sysconfig/iptables
-A INPUT -m state --state160;NEW -m udp -p udp --dport 873 -j ACCEPT160;
-A INPUT -m state --state160;NEW -m tcp -p tcp --dport 873 -j ACCEPT
wq!160;
service160;iptables restart
160;
10) Server lsyncd160;설1221; 0143; 확1064;160;
Service lsyncd start
Chkconfig160;lsyncd on
160;
11)160;TEST