[개발서버] rsyncd 설정

ITWeb/서버관리 2011. 9. 7. 14:48

[기본설명]

rsyncd.conf 를 설정한 서버가 source 가 되며 client 에서는 read 만 가능 하도록 설정 하여 사용을 한다.

 

sudo vi /etc/xinetd.d/rsync

service rsync
{
        disable = no
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/bin/rsync
        server_args     = --daemon
        log_on_failure  += USERID
}

disable = yes 를 disable = no 로 변경

 

service xinetd restart

 

sudo vi /etc/rsyncd.conf

[temp]
path=/home/계정/temp
hosts allow=192.254.0.0/16
uid = nobody
gid = nobody
use chroot = yes
max connections = 4

192.254.0.0 ~ 192.254.255.255 까지 접속 가능 하며

/home/계정/temp 아래 파일을 읽어 갈수 있다.

 

[source]

- hostname : src1

 

[client]

- command : rsync -avz --progress  src1::temp/temp.log .

- src1 서버에 temp.log 파일을 가져와라. src1::temp 는 client 에서 알 필요가 없다.

: