'2012/08'에 해당되는 글 3건

  1. 2012.08.06 apt 사용시 proxy 사용
  2. 2012.08.06 ubuntu repository mirroring
  3. 2012.08.02 GIT 이전

apt 사용시 proxy 사용

Posted by !kKo geek_stuff/server & linux : 2012.08.06 11:12

apt 사용할 때 proxy 뒤에 있지만 local mirroring 이 존재할 때, 다음과 같은 설정을 추가하면 된다.

root@client:# vi /etc/apt.conf


Acquire::http::proxy {
    192.168.0.1 DIRECT;
    "http://192.168.0.254:3128/";
};
Acquire::https::proxy {
    192.168.0.1 DIRECT;
    "https://192.168.0.254:3128/";
};
Acquire::ftp::proxy {
    192.168.0.1 DIRECT;
    "ftp://192.168.0.254:3128/";
};
Acquire::socks::proxy {
    192.168.0.1 DIRECT;
    "socks://192.168.0.254:3128/";
};



192.168.0.1은 local mirroing server 주소 또는 실제 repository address

suffix로 DIRECT 를 추가하면 proxy를 타지 않는다.


192.168.0.254는 proxy address


세미콜론(;) 주의.

저작자 표시 비영리 동일 조건 변경 허락
신고

ubuntu repository mirroring

Posted by !kKo geek_stuff/server & linux : 2012.08.06 11:05

우분투 레포지토리 미러링


내부에 ubuntu 설치된 pc나 서버가 여러대일 경우 각각 하나씩 다운받는 것보다 미러링을 받는게 훨씬 빠르다.

미러링은 의외로 간단한 듯.


1. 서버에서 설정하기

일단 apt-mirror를 설치


root@server:/# apt-get install apt-mirror



이후 /etc/apt/mirror.list를 수정

i-386과 amd-64를 동시에 미러링 한다면 다음과 같이 설정


############# config ##################
#
set base_path    /backup/backupdisk1/ubuntu
#
# 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 ##############

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

# mirror the debian-installer directories for mirroring install base (eg: mini.iso)
deb http://ftp.daum.net/ubuntu precise main main/debian-installer restricted restricted/debian-installer universe universe/debian-installer multiverse multiverse/debian-installer

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

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

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


apt-mirror 실행


root@server:/etc/apt# apt-mirror

root@server:/etc/apt# apt-mirror
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_PAPER = "ko_KR.UTF-8",
    LC_ADDRESS = "ko_KR.UTF-8",
    LC_MONETARY = "ko_KR.UTF-8",
    LC_NUMERIC = "ko_KR.UTF-8",
    LC_TELEPHONE = "ko_KR.UTF-8",
    LC_IDENTIFICATION = "ko_KR.UTF-8",
    LC_MEASUREMENT = "ko_KR.UTF-8",
    LC_TIME = "ko_KR.UTF-8",
    LC_NAME = "ko_KR.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Downloading 222 index files using 20 threads...
Begin time: Mon Aug  6 10:54:08 2012
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]...
End time: Mon Aug  6 10:54:09 2012

Proceed indexes: [SSSSSPPPPPPPPPPP]

0.0 bytes will be downloaded into archive.
Downloading 0 archive files using 0 threads...
Begin time: Mon Aug  6 10:54:20 2012
[0]...
End time: Mon Aug  6 10:54:20 2012


현재 repo 용량은 120G정도?



2. Client 에서 설정하기

/etc/apt/source.list의 host를 모두 수정한다.


deb http://archive.ubuntu.com/ubuntu/ precise main restricted

등을 모두 deb http://${server_ip}/ubuntu/ precise main restricted로 변경한다.

예를 들면 아래와 같이....

# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release i386 (20120423)]/ precise main restricted

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

## Major bug fix updates produced after the final release of the
## distribution.
deb http://192.168.0.1/ubuntu/ precise-updates main restricted
deb-src http://192.168.0.1/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://192.168.0.1/ubuntu/ precise universe
deb-src http://192.168.0.1/ubuntu/ precise universe
deb http://192.168.0.1/ubuntu/ precise-updates universe
deb-src http://192.168.0.1/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://192.168.0.1/ubuntu/ precise multiverse
deb-src http://192.168.0.1/ubuntu/ precise multiverse
deb http://192.168.0.1/ubuntu/ precise-updates multiverse
deb-src http://192.168.0.1/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://192.168.0.1/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://192.168.0.1/ubuntu/ precise-backports main restricted universe multiverse

deb http://192.168.0.1/ubuntu precise-security main restricted
deb-src http://192.168.0.1/ubuntu precise-security main restricted
deb http://192.168.0.1/ubuntu precise-security universe
deb-src http://192.168.0.1/ubuntu precise-security universe
deb http://192.168.0.1/ubuntu precise-security multiverse
deb-src http://192.168.0.1/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://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
deb http://192.168.0.1/ubuntu/ precise-proposed restricted main multiverse universe


또는 스크립트를 사용할 수도...

user@client:/etc/apt# mv source.list source.list.orig; cat source.list.orig | sed "s/kr.archive.ubuntu.com/192.168.0.1/" > source.list


이후 업데이트 한번하고 설치하면 끝

user@client:/# apt-get update




저작자 표시 비영리 동일 조건 변경 허락
신고

GIT 이전

Posted by !kKo geek_stuff/server & linux : 2012.08.02 17:14

GIT public repository 이전


apt-get intall git git-core git-daemon


/etc/service/git-daemon 의 내용을 편집

#!/bin/sh
exec 2>&1
echo 'git-daemon starting.'
exec chpst -ugitdaemon \
  "$(git --exec-path)"/git-daemon --verbose --reuseaddr \
    --base-path=/repository/git/public --export-all --syslog --detach


레포지토리의 path를 --base-path 이후에 적어준다.


이후 기존 repository를 통째로 들고와서 --base-path 에 명시한 디렉토리에 복사.


끝~

저작자 표시 비영리 동일 조건 변경 허락
신고
 «이전 1  다음»