바뀜

둘러보기로 가기 검색하러 가기
3,038 바이트 추가됨 ,  2021년 5월 1일 (토) 22:35
편집 요약 없음
<pre>
$ tail -f /home/ftpsync/log/rsync-ftpsync-security.log
</pre>
 
 
=== 저장소(debian-cd) 미러링 ===
 
==== /home/ftpsync/etc/ftpsync-cd.conf 파일 생성 ====
/home/ftpsync/etc/ftpsync.conf.sample 파일을 복사해서 ftpsync-cd.conf 파일을 생성합니다.
 
<pre>
$ id
uid=1001(ftpsync) gid=1001(ftpsync) groups=1001(ftpsync)
$ cp /home/ftpsync/etc/ftpsync.conf.sample /home/ftpsync/etc/ftpsync-cd.conf
</pre>
 
==== /home/ftpsync/etc/ftpsync-cd.conf 파일 설정 ====
ftpsync-security.conf 파일은 데비안 미러 서버에서 'debian-cd' 저장소를 다운로드하는 데 사용합니다. 저는 ftpsync-cd.conf 파일을 이용해 http://mirror.debianusers.or.kr/debian-cd/ 저장소를 만들었습니다.
제가 사용하는 ftpsync-cd.conf는 다음과 같습니다.
 
<syntaxhighlight lang="diff">
########################################################################
########################################################################
## This is a sample configuration file for the ftpsync mirror script. ##
## Only options most users may need are included. For documentation ##
## and all available options see ftpsync.conf(5). ##
########################################################################
########################################################################
 
- # MIRRORNAME=`hostname -f`
+ MIRRORNAME=`hostname -f`
- # TO="/srv/mirrors/debian/"
+ TO="/data/mirrors/debian-cd/"
# MAILTO="$LOGNAME"
# HUB=false
 
########################################################################
## Connection options
########################################################################
 
- RSYNC_HOST=
+ RSYNC_HOST="ftp.kaist.ac.kr"
- RSYNC_PATH="debian"
+ RSYNC_PATH="debian-cd"
# RSYNC_USER=
# RSYNC_PASSWORD=
 
########################################################################
## Mirror information options
########################################################################
 
# INFO_MAINTAINER="Admins <admins@example.com>, Person <person@example.com>"
# INFO_SPONSOR="Example <https://example.com>"
# INFO_COUNTRY=DE
# INFO_LOCATION="Example"
# INFO_THROUGHPUT=10Gb
 
########################################################################
## Include and exclude options
########################################################################
 
- # ARCH_INCLUDE=
+ #ARCH_INCLUDE="all amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x"
+ ARCH_INCLUDE="amd64 i386"
# ARCH_EXCLUDE=
 
########################################################################
## Log option
########################################################################
 
- # LOGDIR=
+ LOGDIR="/home/ftpsync/log"
 
+ ## limit I/O bandwidth. Value is KBytes per second, unset or 0 means unlimited
+ RSYNC_BW="1024" # (1024KByte/s / 1024) * 8 = 8Mbit/s
</syntaxhighlight>
 
 
==== 미러링 실행 ====
 
<pre>
$ /home/ftpsync/bin/./ftpsync sync:archive:cd
</pre>
 
 
==== 미러링 로그 확인 ====
 
아래 명령으로 미러링의 실시간 로그를 확인할 수 있습니다.
 
<pre>
$ tail -f /home/ftpsync/log/rsync-ftpsync-cd.log
</pre>

둘러보기 메뉴