3. OS이야기/ 01. Administration

yum을 이용한 rpm 패키지 다운로드

OSSW(Open Source System SoftWare 2014. 7. 29. 13:23

인터넷이 사용 가능한 환경이라면 yum으로 설치를 진행하면 됩니다.

하지만 인터넷이 안되는 환경의 서버라면 어떻게 할까요?

방법은 인터넷이 가능한 서버(컴퓨터)에서 yum plugin 설치하여 rpm 패키지를 받아 설치를 진행하시면 됩니다.


Yum plugin rpm 패키지 다운로드 (Downloadonly)

[a] --downloadonly : don't update, just download a rpm file
[b] --downloaddir=/path/to/dir : specifies an alternate directory to store packages such as /tmp


Downloadonly package 설치하지 않고 rpm package만을 다운로드 해주는 plugin입니다.

1.     Downloadonly 설치

Yum install yum-downloadonly


2.     download시에는 –downloadonly 옵션 사용

yum install openssh –y –downloadonly


3.     다운로드 파일 경로 지정

Yum install openssh –y –downloadonly –downloaddir=/home


예) 

[root@test~]# yum install -y ntp --downloadonly --downloaddir=/root

Loaded plugins: downloadonly, fastestmirror, security, verify

Loading mirror speeds from cached hostfile

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package ntp.x86_64 0:4.2.4p8-2.el6.centos will be updated

---> Package ntp.x86_64 0:4.2.6p5-1.el6.centos will be an update

--> Processing Dependency: ntpdate = 4.2.6p5-1.el6.centos for package: ntp-4.2.6p5-1.el6.centos.x86_64

--> Running transaction check

---> Package ntpdate.x86_64 0:4.2.4p8-2.el6.centos will be updated

---> Package ntpdate.x86_64 0:4.2.6p5-1.el6.centos will be an update

--> Finished Dependency Resolution

 

Dependencies Resolved

=================================================================================================

Package                     Arch                       Version                                    Repository                  Size

=================================================================================================

Updating:

ntp                         x86_64                     4.2.6p5-1.el6.centos                       addons                     592 k

Updating for dependencies:

ntpdate                     x86_64                     4.2.6p5-1.el6.centos                       addons                      75 k

Transaction Summary

=================================================================================================

Upgrade       2 Package(s)

 

Total download size: 667 k

Downloading Packages:

(1/2): ntp-4.2.6p5-1.el6.centos.x86_64.rpm                                                                   | 592 kB     00:00    

(2/2): ntpdate-4.2.6p5-1.el6.centos.x86_64.rpm                                                               |  75 kB     00:00    

-----------------------------------------------------------------------------------------------------

Total                                                                                               5.0 MB/s | 667 kB     00:00    

exiting because --downloadonly specified

 

 

[root@test~]# ll ntp*

-rw-r--r-- 1 root root 606036 Nov 25  2013 ntp-4.2.6p5-1.el6.centos.x86_64.rpm

-rw-r--r-- 1 root root  76580 Nov 25  2013 ntpdate-4.2.6p5-1.el6.centos.x86_64.rpm


 

Yum plugin 검증(verify)

설치된 Yum 패키지를 검증해 주는 plugin 입니다.

다음과 같이 명령어로 패키지를 검증   있습니다.


1.     Yum-verify 설치


[root@test~]# yum install yum-verify

Loaded plugins: downloadonly, fastestmirror, security

Loading mirror speeds from cached hostfile

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package yum-plugin-verify.noarch 0:1.1.30-14.el6 will be installed

--> Finished Dependency Resolution

 

Dependencies Resolved

 

================================================================================================

Package                              Arch                      Version                             Repository                 Size

================================================================================================

Installing:

yum-plugin-verify                    noarch                    1.1.30-14.el6                       addons                     29 k

Transaction Summary

================================================================================================

Install       1 Package(s)

 

Total download size: 29 k

Installed size: 49 k

Is this ok [y/N]: y

Downloading Packages:

yum-plugin-verify-1.1.30-14.el6.noarch.rpm                                                                   |  29 kB     00:00    

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing : yum-plugin-verify-1.1.30-14.el6.noarch                                                                           1/1

  Verifying  : yum-plugin-verify-1.1.30-14.el6.noarch                                                                           1/1

 

Installed:

  yum-plugin-verify.noarch 0:1.1.30-14.el6                                                                                         

 

Complete!

 

Yum install yum-verify

[root@test~]# yum verify openssl

Loaded plugins: downloadonly, fastestmirror, security, verify

verify done

[root@test~]# yum verify --verify-filename='/usr/bin/openssl' --verify-configuration-files=yes

Loaded plugins: downloadonly, fastestmirror, security, verify

verify done

 

확인 하실  있습니다.


posted by 조경래