lsyncd ½Ç½Ã°£ µ¿±âÈ­

   Á¶È¸ 6416   Ãßõ 0    

https://www.ehostidc.co.kr/cscenter/technical.php?ptype=view&idx=271&¡¦ (410)
https://www.ehostidc.co.kr/cscenter/consulting.php (353)


Lsycnd server: x.x.x.107

Lsyncd client: x.x.x.108 

 

1) Client rsync 설치 

yum install -y rsync xinetd

 

2) Client rsync 설정 



vi /etc/rsyncd.conf

[SYNC] 

comment = web_02 (hostname) 

path=/var/www/html (path)

hosts allow = x.x.x.107 (lsyncd server IP) 

uid = 0 

gid = 0

use chroot = yes 

read only = no

 

3) Client iptables 설정 및 적용 

vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m udp -p udp --dport 873 -j ACCEPT 

-A INPUT -m state --state NEW -m tcp -p tcp --dport 873 -j ACCEPT 

wq!

service iptables restart

 

4) Client rsyncd 설정 및 확인 

service xinetd restart

chkconfig xinetd on

 

5) Server lsyncd 설치 

Yum install –y lsyncd

 

6) Server ssh 인증키 생성 및 이동

Ssh-keygen

cp /root/.ssh/id_rsa.pub /root/

 

7) ssh 접속 테스트 

8) Server lsync 설정 

vi /etc/lsyncd.conf

settings { 

        logfile = "/var/log/lsyncd/lsyncd.log",

        statusFile = "/var/log/lsyncd/lsyncd-status.log", 

        statusInterval = 20

     } 

sync { 

    default.rsync,

    source="/var/www/html", 

    target="x.x.x.108:/var/www/html",

    delay = 1, 

    rsync = {

         compress = true, 

         acls = true,

         verbose = true, 

         rsh = "/usr/bin/ssh -p 22 -o StrictHostKeyChecking=no" }

 }

 

9) Server iptables 설정 및 적용 

vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m udp -p udp --dport 873 -j ACCEPT 

-A INPUT -m state --state NEW -m tcp -p tcp --dport 873 -j ACCEPT

wq! 

service iptables restart

 

10) Server lsyncd 설정 및 확인 

Service lsyncd start

Chkconfig lsyncd on

 

11) TEST






























https://www.aiocp.co.kr/ ( 딥러닝,머신러닝 서버 판매 ,컨설팅) https://bigbangcloud.co.kr/ ( GPU 클라우드 서비스) ::: AI 서버의 모든것 ::: 인공지능의 시작~ (주)이호스트ICT
ªÀº±Û Àϼö·Ï ½ÅÁßÇÏ°Ô.


PDS
Á¦¸ñPage 17/77
2014-05   4947743   Á¤ÀºÁØ1
2015-12   1484438   ¹é¸Þ°¡
2018-01   53083   ¿¥ºê¸®¿À
2018-02   15742   »õÃÑ
2018-02   10290   ÀüÁ÷P¿¬±¸¿ø
2018-02   16246   ¾ß¼ö
2018-02   16353   ¹¬Çâll±è±âÁØ
2018-02   17426   ȸ¿øK
2018-03   19192   ±èÀÍÅÂ
2018-04   15150   ȸ¿øK
2018-06   16427   µ¥µð
2018-06   12484   »õÇϾᱸ¸§
2018-12   11951   Çϳª·ë
2018-12   12747   ¹«¾Æ
2019-01   11516   ÀÌÇϳª
2019-02   37933   Æ丣¼¼¿ì½º
2019-02   7920   Æ丣¼¼¿ì½º
2019-02   7566   Æ丣¼¼¿ì½º
2019-02   9564   À¸¶óÂ÷Â÷Â÷
2019-02   11072   MoonsTale
2019-04   7482   PCMaster
2019-05   7419   ¹«¾Æ