Yum 저장소를 로컬에 다운로드하기

1 개요[ | ]

Yum base 저장소를 로컬에 다운로드하기

2 사전작업[ | ]

3 다운로드[ | ]

Console
Copy
[root@zetawiki ~]# mkdir /myrepo
[root@zetawiki ~]# cd /myrepo
[root@zetawiki myrepo]# reposync -m --download-metadata -r base
No Presto metadata available for base
(1/9363): 389-ds-base-snmp-1.3.5.10-11.el7.x86_64.rpm                 | 150 kB  00:00:01     
(2/9363): ElectricFence-2.2.2-39.el7.i686.rpm                         |  35 kB  00:00:00     
(3/9363): ElectricFence-2.2.2-39.el7.x86_64.rpm                       |  35 kB  00:00:00     
... (생략)
Console
Copy
[root@zetawiki myrepo]# reposync -m --download-metadata -r extras
... (생략)
Console
Copy
[root@zetawiki myrepo]# reposync -m --download-metadata -r updates
updates/7/x86_64/prestodelta                                          | 242 kB  00:00:04     
(1/673): 389-ds-base-devel-1.3.6.1-19.el7_4.x86_64.rpm                | 256 kB  00:00:20     
(2/673): 389-ds-base-libs-1.3.6.1-19.el7_4.x86_64.rpm                 | 678 kB  00:00:23     
(3/673): 389-ds-base-snmp-1.3.6.1-19.el7_4.x86_64.rpm                 | 158 kB  00:00:01  
... (생략)

4 repomd.xml 받기[ | ]

Console
Copy
[root@zetawiki myrepo]# mkdir repodata
[root@zetawiki myrepo]# cd repodata
[root@zetawiki repodata]# wget http://ftp.kaist.ac.kr/CentOS/7/updates/x86_64/repodata/repomd.xml

5 yum 저장소 설정 변경[ | ]

Console
Copy
[root@zetawiki repodata]# vi /etc/yum.repos.d/CentOS-Base.repo
Console
Copy
[base]
name=CentOS-$releasever - Base
baseurl=file:///myrepo/base/
gpgcheck=0

[extras]
name=CentOS-$releasever - Extras
baseurl=file:///myrepo/extras/
gpgcheck=0

[updates]
name=CentOS-$releasever - Updates
baseurl=file:///myrepo/updates/
gpgcheck=0

6 yum 로컬저장소 테스트[ | ]

Console
Copy
[root@zetawiki repodata]# yum repolist

7 같이 보기[ | ]

8 참고[ | ]