취미/프로그래밍

Ubuntu apt-get install 속도 높이기

D.Dic. 2018. 5. 14. 23:46

Ubuntu에서 어떤 프로그램을 받을 때 apt-get install 명령어를 통해 진행한다. 그러나 Ubuntu에서 기본적으로 제공하는 다운로드 서버의 속도가 썩 좋지 않아, 답답할 때가 많다.


오늘은 이 서버를 kakao에서 제공하는 곳으로 바꿔서 다운로드 속도를 높여보고자 한다.



우선 우리가 작업할 파일을 백업하자.


ㅣconsole

$sudo cp /etc/apt/sources.list /etc/apt/sources.list.ori



백업 후 아래 명령어를 통해 수정할 것이다. 


ㅣconsole

$sudo vi /etc/apt/sources.list



위와 같이 입력하면 아래의 창이 뜬다. 


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

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

deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu/ xenial-security main restricted
deb http://security.ubuntu.com/ubuntu/ xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu/ xenial-security universe
deb http://security.ubuntu.com/ubuntu/ xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu/ xenial-security multiverse



여기서 다음의 명령어로 찾아바꾸기를 할 수 있다. archive.ubuntu.com을 mirror.kakao.com으로 바꾸겠다는 의미이다.


ㅣvi editor

:%s/archive.ubuntu.com/mirror.kakao.com



바뀌고 나면 다음 명령어를 통해 변경사항을 저장한다.


ㅣvi editor

:wq!



파일 수정이 완료되었으면 다음 명령어로 업데이트를 실행해 잘 작동하는지를 확인하자.


ㅣconsole

$sudo apt-get update

서버가 mirror.kakao.com으로 바뀌었으면 끝!


'취미 > 프로그래밍' 카테고리의 다른 글

[gitHub] 처음 설정하기  (0) 2018.05.17
[django] 첫 django 앱 만들기 part 2  (0) 2018.05.15
[django] 첫 django 앱 만들기 part 1  (0) 2018.05.15
yarn 설치하기  (0) 2018.05.08
nodejs & npm 설치  (0) 2018.05.04