728x90
반응형
•base와 동일하므로 특별히 바꿀 필요는 없으나, 한국에서 사용시 전송속도가 빠르다.
기존 저장소 압축 보존
명령어
bzip2 /etc/yum.repos.d/CentOS-*.repo
yum repolist
실행예시
[root@zetawiki ~]# ll /etc/yum.repos.d/
total 16
-rw-r--r--. 1 root root 1926 Jun 26 2012 CentOS-Base.repo
-rw-r--r--. 1 root root 637 Jun 26 2012 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 626 Jun 26 2012 CentOS-Media.repo
-rw-r--r--. 1 root root 2593 Jun 26 2012 CentOS-Vault.repo
[root@zetawiki ~]# yum repolist
... (생략)
repo id repo name status
base CentOS-6 - Base 6,381
extras CentOS-6 - Extras 13
updates CentOS-6 - Updates 1,555
repolist: 7,949
[root@zetawiki ~]# bzip2 /etc/yum.repos.d/CentOS-*.repo
[root@zetawiki ~]# ll /etc/yum.repos.d/
total 16
-rw-r--r--. 1 root root 682 Jun 26 2012 CentOS-Base.repo.bz2
-rw-r--r--. 1 root root 442 Jun 26 2012 CentOS-Debuginfo.repo.bz2
-rw-r--r--. 1 root root 414 Jun 26 2012 CentOS-Media.repo.bz2
-rw-r--r--. 1 root root 409 Jun 26 2012 CentOS-Vault.repo.bz2
[root@zetawiki ~]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
repolist: 0
→ 확장자가 repo인 파일이 없어서 repolist도 0이 되었다.
Daum.repo 파일 생성
/etc/yum.repos.d/ 폴더에 Daum.repo 파일을 만든다.
명령어
echo '[base]
name=CentOS-$releasever - Base
baseurl=http://ftp.daum.net/centos/$releasever/os/$basearch/
gpgcheck=0
[updates]
name=CentOS-$releasever - Updates
baseurl=http://ftp.daum.net/centos/$releasever/updates/$basearch/
gpgcheck=0
[extras]
name=CentOS-$releasever - Extras
baseurl=http://ftp.daum.net/centos/$releasever/extras/$basearch/
gpgcheck=0' > /etc/yum.repos.d/Daum.repo
yum repolist
실행예시
[root@zetawiki ~]# echo '[base]
> name=CentOS-$releasever - Base
> baseurl=http://ftp.daum.net/centos/$releasever/os/$basearch/
> gpgcheck=0
> [updates]
> name=CentOS-$releasever - Updates
> baseurl=http://ftp.daum.net/centos/$releasever/updates/$basearch/
> gpgcheck=0
> [extras]
> name=CentOS-$releasever - Extras
> baseurl=http://ftp.daum.net/centos/$releasever/extras/$basearch/
> gpgcheck=0' > /etc/yum.repos.d/Daum.repo
[root@zetawiki ~]# yum repolist
... (생략)
repo id repo name status
base CentOS-6 - Base 6,381
extras CentOS-6 - Extras 13
updates CentOS-6 - Updates 1,555
repolist: 7,949
(원상복구)
Daum repo 대신 CentOS 기본 저장소를 사용하고 싶을 경우도 있을 것이다.[1] Daum.repo 파일을 삭제하고 CentOS repo파일들을 복원하자.
명령어
rm -f /etc/yum.repos.d/Daum.repo
bunzip2 /etc/yum.repos.d/CentOS-*
yum repolist
실행예시
[root@zetawiki ~]# rm -f /etc/yum.repos.d/Daum.repo
[root@zetawiki ~]# bunzip2 /etc/yum.repos.d/CentOS-*
[root@zetawiki ~]# yum repolist
... (생략)
repo id repo name status
base CentOS-6 - Base 6,381
extras CentOS-6 - Extras 13
updates CentOS-6 - Updates 1,555
repolist: 7,949
→ 최초 상태로 돌아왔다.
기존 저장소 압축 보존
명령어
bzip2 /etc/yum.repos.d/CentOS-*.repo
yum repolist
실행예시
[root@zetawiki ~]# ll /etc/yum.repos.d/
total 16
-rw-r--r--. 1 root root 1926 Jun 26 2012 CentOS-Base.repo
-rw-r--r--. 1 root root 637 Jun 26 2012 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 626 Jun 26 2012 CentOS-Media.repo
-rw-r--r--. 1 root root 2593 Jun 26 2012 CentOS-Vault.repo
[root@zetawiki ~]# yum repolist
... (생략)
repo id repo name status
base CentOS-6 - Base 6,381
extras CentOS-6 - Extras 13
updates CentOS-6 - Updates 1,555
repolist: 7,949
[root@zetawiki ~]# bzip2 /etc/yum.repos.d/CentOS-*.repo
[root@zetawiki ~]# ll /etc/yum.repos.d/
total 16
-rw-r--r--. 1 root root 682 Jun 26 2012 CentOS-Base.repo.bz2
-rw-r--r--. 1 root root 442 Jun 26 2012 CentOS-Debuginfo.repo.bz2
-rw-r--r--. 1 root root 414 Jun 26 2012 CentOS-Media.repo.bz2
-rw-r--r--. 1 root root 409 Jun 26 2012 CentOS-Vault.repo.bz2
[root@zetawiki ~]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
repolist: 0
→ 확장자가 repo인 파일이 없어서 repolist도 0이 되었다.
Daum.repo 파일 생성
/etc/yum.repos.d/ 폴더에 Daum.repo 파일을 만든다.
명령어
echo '[base]
name=CentOS-$releasever - Base
baseurl=http://ftp.daum.net/centos/$releasever/os/$basearch/
gpgcheck=0
[updates]
name=CentOS-$releasever - Updates
baseurl=http://ftp.daum.net/centos/$releasever/updates/$basearch/
gpgcheck=0
[extras]
name=CentOS-$releasever - Extras
baseurl=http://ftp.daum.net/centos/$releasever/extras/$basearch/
gpgcheck=0' > /etc/yum.repos.d/Daum.repo
yum repolist
실행예시
[root@zetawiki ~]# echo '[base]
> name=CentOS-$releasever - Base
> baseurl=http://ftp.daum.net/centos/$releasever/os/$basearch/
> gpgcheck=0
> [updates]
> name=CentOS-$releasever - Updates
> baseurl=http://ftp.daum.net/centos/$releasever/updates/$basearch/
> gpgcheck=0
> [extras]
> name=CentOS-$releasever - Extras
> baseurl=http://ftp.daum.net/centos/$releasever/extras/$basearch/
> gpgcheck=0' > /etc/yum.repos.d/Daum.repo
[root@zetawiki ~]# yum repolist
... (생략)
repo id repo name status
base CentOS-6 - Base 6,381
extras CentOS-6 - Extras 13
updates CentOS-6 - Updates 1,555
repolist: 7,949
(원상복구)
Daum repo 대신 CentOS 기본 저장소를 사용하고 싶을 경우도 있을 것이다.[1] Daum.repo 파일을 삭제하고 CentOS repo파일들을 복원하자.
명령어
rm -f /etc/yum.repos.d/Daum.repo
bunzip2 /etc/yum.repos.d/CentOS-*
yum repolist
실행예시
[root@zetawiki ~]# rm -f /etc/yum.repos.d/Daum.repo
[root@zetawiki ~]# bunzip2 /etc/yum.repos.d/CentOS-*
[root@zetawiki ~]# yum repolist
... (생략)
repo id repo name status
base CentOS-6 - Base 6,381
extras CentOS-6 - Extras 13
updates CentOS-6 - Updates 1,555
repolist: 7,949
→ 최초 상태로 돌아왔다.
반응형
'엔지니어 > Linux' 카테고리의 다른 글
hping (0) | 2016.05.26 |
---|---|
e1000: eth0: e1000_clean_tx_irq : Detected Tx Unit Hang (0) | 2016.05.26 |
node.js 설치 (0) | 2016.05.26 |
iptables-xml (0) | 2016.05.26 |
MongoDB ReplicaSet (0) | 2016.05.26 |