Ubuntu

ubuntu mirror server 구축

Naan 2014. 3. 24. 14:15
320x100

ubuntu mirror server 구축 방법




# apt-get update

# apt-get -y install apt-mirror

# apt-get -y apache2


# cd /etc/apt/

# vi mirror.list (파일이 있다 해외서버를 한국서버로 변경하자)

# apt-mirror configuration file


############# config ##################

#

# set base_path    /var/spool/apt-mirror

#

# set mirror_path  $base_path/mirror

# set skel_path    $base_path/skel

# set var_path     $base_path/var

# set cleanscript $var_path/clean.sh

# set defaultarch  <running host architecture>

# set postmirror_script $var_path/postmirror.sh

# set run_postmirror 0

set nthreads     20

set _tilde 0

#

############# end config ##############


# 64Bit Mirror

deb-amd64 http://ftp.daum.net/ubuntu precise main restricted universe multiverse

deb-amd64 http://ftp.daum.net/ubuntu precise-security main restricted universe multiverse

deb-amd64 http://ftp.daum.net/ubuntu precise-updates main restricted universe multiverse

deb-amd64 http://ftp.daum.net/ubuntu precise-proposed main restricted universe multiverse

deb-amd64 http://ftp.daum.net/ubuntu precise-backports main restricted universe multiverse


# 32Bit Mirror

deb-i386 http://ftp.daum.net/ubuntu precise main restricted universe multiverse

deb-i386 http://ftp.daum.net/ubuntu precise-security main restricted universe multiverse

deb-i386 http://ftp.daum.net/ubuntu precise-updates main restricted universe multiverse

deb-i386 http://ftp.daum.net/ubuntu precise-proposed main restricted universe multiverse

deb-i386 http://ftp.daum.net/ubuntu precise-backports main restricted universe multiverse


clean http://ftp.daum.net/ubuntu




# apt-mirror

Downloading 84 index files using 20 threads...

Begin time: Mon Mar 24 12:20:07 2014

[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]...

End time: Mon Mar 24 12:20:39 2014


Proceed indexes: [SSSPPP]


108.4 GiB will be downloaded into archive.

Downloading 105708 archive files using 20 threads...

Begin time: Mon Mar 24 12:20:47 2014

[20]... [19]...


약 100G 정도 다운 받고 나면

mirror 다운 받은 경로를 아파치경로로 심볼링 링크 걸어주면 된다.

# ln -s /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/ /var/www/ubuntu
 - 다운받는 경로는 버전, 서버에 따라 다르다 

http://192.168.0.2/ubuntu 
사이트 접속후 아파치 접속 화면이 뜨면 정상적으로 작동되는것이다.

이제 클라이언트에서

# vi /etc/apt/sources.list 수정하자

모두 수정하자(32bit 기준)
#e Pangolin_ - Release i386 (20130820.1)]/ precise main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ftp.daum.net/ubuntu/ precise main restricted
deb-src http://ftp.daum.net/ubuntu/ precise main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ftp.daum.net/ubuntu/ precise-updates main restricted
deb-src http://ftp.daum.net/ubuntu/ precise-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ftp.daum.net/ubuntu/ precise universe
deb-src http://ftp.daum.net/ubuntu/ precise universe
deb http://ftp.daum.net/ubuntu/ precise-updates universe
deb-src http://ftp.daum.net/ubuntu/ precise-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ftp.daum.net/ubuntu/ precise multiverse
deb-src http://ftp.daum.net/ubuntu/ precise multiverse
deb http://ftp.daum.net/ubuntu/ precise-updates multiverse
deb-src http://ftp.daum.net/ubuntu/ precise-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ftp.daum.net/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://ftp.daum.net/ubuntu/ precise-backports main restricted universe multiverse

deb http://ftp.daum.net/ubuntu precise-security main restricted
deb-src http://ftp.daum.net/ubuntu precise-security main restricted
deb http://ftp.daum.net/ubuntu precise-security universe
deb-src http://ftp.daum.net/ubuntu precise-security universe
deb http://ftp.daum.net/ubuntu precise-security multiverse
deb-src http://ftp.daum.net/ubuntu precise-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://ftp.daum.net/ubuntu precise main
deb-src http://ftp.daum.net/ubuntu precise main

확인 해보자
# apt-get update 
쭈욱~ 솰라솰라 뜬다 그럼 성공






320x100