yum을 통한 rpm만 다운로드 받기

그니까.. 설치는 필요 없고.. rpm 파일만 다운로드 받고자 하는 경우가 있음.

% yum install yum-plugin-downloadonly
% yum install --downloadonly --downloaddir=/tmp memcached
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package memcached.x86_64 0:1.4.4-3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================
 Package                           Arch                           Version                             Repository                    Size
===========================================================================================
Installing:
 memcached                         x86_64                         1.4.4-3.el6                         base                          68 k

Transaction Summary
===========================================================================================
Install       1 Package(s)

Total download size: 68 k
Installed size: 147 k
Is this ok [y/N]: y
Downloading Packages:
memcached-1.4.4-3.el6.x86_64.rpm                                                                                  |  68 kB     00:01


exiting because --downloadonly specified

RHEL 공식 repository 대신 CentOS repository 사용하기

yum을 통한 패키지 설치시..
RHEL 공식 repository에 접근할수 없는 경우..
RHEL의 쌍둥이.. CentOS의 repository를 이용하는 방법이 있음.

% cd /etc/yum.repos.d
% cp rhel.repo centos.repo
% vim centos.repo
[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.centos.org/centos/6/os/$basearch/
gpgcheck=1
 
[update]
name=CentOS-$releasever - Updates
baseurl=http://mirror.centos.org/centos/6/updates/$basearch/
gpgcheck=1

% rpm --import http://mirror.centos.org/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
% yum list