바뀜

둘러보기로 가기 검색하러 가기
3,709 바이트 추가됨 ,  2021년 5월 1일 (토) 20:19
편집 요약 없음
이제 MRTG의 인덱스 페이지를 볼 수 있습니다. 저의 경우는 http://mirror.debianusers.or.kr/mrtg/ 에서 MRTG의 인덱스 페이지를 확인할 수 있습니다.
 
== 디렉터리(/data) ==
 
=== 디렉터리(/data)의 퍼미션 변경 ===
 
<pre>
$ sudo chmod 757 data
</pre>
 
=== 미러용 디렉터리(/data/mirrors) 생성 ===
 
<pre>
$ id
uid=1001(ftpsync) gid=1001(ftpsync) groups=1001(ftpsync)
$ mkdir /data/mirrors
</pre>
 
== ftpsync ==
 
=== 사용자 계정(ftpsync) 생성 ===
 
<pre>
$ sudo adduser ftpsync
</pre>
 
=== crontab을 사용할 수 있는 사용자 설정 ===
 
/etc/cron.allow 파일에 'ftpsync'를 추가한 후 저장합니다.
 
<syntaxhighlight lang="diff">
root
westporch
+ ftpsync
</syntaxhighlight>
 
 
크론을 다시 시작합니다.
 
<pre>
$ sudo systemctl restart cron
</pre>
 
 
=== ftpsync 다운로드 ===
아래 명령어로 ftpsync를 내려받습니다.
 
<pre>
$ wget https://ftp-master.debian.org/ftpsync.tar.gz -P /home/ftpsync
</pre>
 
다운로드 받은 파일을 압축 해제합니다. ftpsync.tar.gz 파일의 압축을 해제하면 distrib 디렉터리가 생깁니다.
 
 
=== 디렉터리 변경(이동) ===
 
<pre>
$ mv /home/ftpsync/distrib/bin /home/ftpsync/
$ mv /home/ftpsync/distrib/etc /home/ftpsync/
</pre>
 
 
=== 로그 디렉터리 생성 ===
<pre>
$ id
uid=1001(ftpsync) gid=1001(ftpsync) groups=1001(ftpsync)
$ mkdir /home/ftpsync/log
</pre>
 
 
=== ftpsync.conf 파일 생성 ===
ftpsync.conf.sample 파일을 복사해서 ftpsync.conf 파일을 생성합니다.
 
<pre>
$ cp /home/ftpsync/etc/ftpsync.conf.sample /home/ftpsync/etc/ftpsync.conf
</pre>
 
 
=== /home/ftpsync/etc/ftpsync.conf 파일 설정 ===
ftpsync.conf 파일은 데비안 미러 서버에서 'debian' 저장소를 다운로드하는 데 사용합니다. 저는 ftpsync.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/"
# MAILTO="$LOGNAME"
# HUB=false
 
########################################################################
## Connection options
########################################################################
 
- RSYNC_HOST=
+ RSYNC_HOST= "ftp.kaist.ac.kr"
RSYNC_PATH="debian"
# 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 source"
# 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>
== 참고 ==

둘러보기 메뉴