인터넷이 사용 가능한 환경이라면 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 조경래
'3. OS이야기 > 01. Administration' 카테고리의 다른 글
CentOS Minimal 설치 후 X Windows 설치 방법 (0) | 2014.07.30 |
---|---|
L4 mode 비교 (Proxy vs. DSR) 및 Linux에서 L4모드 변경(Proxy -> DSR) 방법 (0) | 2014.07.29 |
[UNIX/LINUX] 파일시스템의 i-node 튜닝 (0) | 2014.07.08 |
[UNIX/LINUX] inode로 파일 삭제하기 (0) | 2014.07.04 |
Yum 명령어 기본 사용 정리 (0) | 2014.06.30 |