Rsync Replication: 두 판 사이의 차이
둘러보기로 이동
검색으로 이동
imported>Drake (→서버 설정) |
imported>Drake (→서버 설정) |
||
| 10번째 줄: | 10번째 줄: | ||
== 서버 설정 == | == 서버 설정 == | ||
* 설정파일 /etc/rsyncd.conf를 다음과 같이 작성한다. | * 설정파일 /etc/rsyncd.conf를 다음과 같이 작성한다. | ||
<source | <source> | ||
max connections = 2 | max connections = 2 | ||
log file = /var/log/rsync.log | log file = /var/log/rsync.log | ||
| 23번째 줄: | 23번째 줄: | ||
use chroot = yes | use chroot = yes | ||
</source> | </source> | ||
* 설정파일 /etc/default/rsync을 다음과 같이 편집한다. | |||
<source> | |||
RSYNC_ENABLE=true | |||
</source> | |||
* 구축이 되었다. rsync를 재시동하자. | |||
<source lang="bash"> | |||
sudo /etc/init.d/rsync restart | |||
</source> | |||
== 클라이언트 설정 == | |||
2015년 4월 19일 (일) 14:39 판
Rsync란?
- 동기화에 최적화되어 있는 프로그램.
- 서버는 복사할 소스를 가지고 있고, 클라이언트는 서버로부터 뽑아온다는 내용으로 가정한다.
사전준비
- 프로그램 설치
<source lang="bash"> sudo apt-get install -y rsync </source>
- tcp 873 포트가 열려있는지 확인한다.
서버 설정
- 설정파일 /etc/rsyncd.conf를 다음과 같이 작성한다.
<source> max connections = 2 log file = /var/log/rsync.log timeout = 300
[share] comment = Ubuntu home path = /home/ubuntu read only = yes uid = ubuntu gid = ubuntu use chroot = yes </source>
- 설정파일 /etc/default/rsync을 다음과 같이 편집한다.
<source> RSYNC_ENABLE=true </source>
- 구축이 되었다. rsync를 재시동하자.
<source lang="bash"> sudo /etc/init.d/rsync restart </source>