LINUX YUM
|
|
|
|
|
|
LINUX YUM
Yellow dog Updater, Modified 의 약자이다.
RPM 기반의 시스템을
위한 자동화 설치/제거/업데이트 도구이다.
기존의 RPM 의 경우 패키지간의 Dependency 로 인해 중간중간 막히는 경우가 많다. YUM 을
사용하는 경우 이러한 부분도 자동화 설치가 가능하다.
YUM 이외에도 자동화
설치가 가능한 도구로 Apt, Smart, up2date, Red Carpet 등이 있다.
YUM 은 python 으로 제작되었고 단점으로 최신의 배포버전을 위해서 최신의 YUM 을
사용해야 하는 점이다. (http://dag.wieers.com/rpm/FAQ.php#B
의 B4. How do I use Yum ? 부분 참고)
YUM 사용에 앞서 Repository 에 대한 설정을 해야 한다.
여기서는 Repository 로 RPMforge 를 사용하겠다.
RPMforge 를 설치하기 위해서는 아래의 페이지로 이동한다.
http://dag.wieers.com/rpm/FAQ.php#B
위 페이지에서
사용하는 OS 에 맞는 RPM 을 다운받아 설치한다.
[root@oracle64
~]# rpm
-Uhv
http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm Retrieving
http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm warning:
/var/tmp/rpm-xfer.oktAx6: Header V3 DSA signature: NOKEY, key ID 6b8d79e6 Preparing... ###########################################
[100%] 1:rpmforge-release
########################################### [100%] |
*설치에 사용한 OS는 ORACLE LINUX5 (64bit) 이다.*
위 RPM 설치를 완료후 아래의 명령을 실행한다.
이 과정을 통해 rpmforge 를 repository 로 등록하게 된다.
[root@oracle64
etc]# yum
update Loading
"installonlyn" plugin Setting up Update
Process Setting up
repositories Reading
repository metadata in from local files primary.xml.gz 100% |=========================|
2.2 MB 00:06 ##################################################
10372/10372 Resolving
Dependencies --> Populating
transaction set with selected packages. Please wait. ---> Downloading
header for rpmforge-release to pack into transaction set. rpmforge-release-0.5.2-2.
100% |=========================| 8.5 kB
00:00 ---> Package
rpmforge-release.x86_64 0:0.5.2-2.el5.rf set to be updated --> Running
transaction check Dependencies
Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Updating: rpmforge-release x86_64 0.5.2-2.el5.rf rpmforge 12 k Transaction
Summary ============================================================================= Install 0 Package(s) Update 1 Package(s) Remove 0 Package(s) Total download
size: 12 k Is this ok [y/N]:
y Downloading
Packages: (1/1):
rpmforge-release-0 100% |=========================| 12 kB
00:00 Running
Transaction Test Finished
Transaction Test Transaction Test
Succeeded Running
Transaction Updating
: rpmforge-release
######################### [1/2] Cleanup
: rpmforge-release
######################### [2/2] Updated:
rpmforge-release.x86_64 0:0.5.2-2.el5.rf Complete! |
yum install <name or package>
해당 키워드에 해당하는 패키지를 install 한다.
해당 키워드에
해당하는 패키지를 찾는다. (로컬 + Repository)
여기서는 oracle-validated package 를 설치해보겠다.
해당 Package 는
Oracle Version 마다 각기 rpm 이 있는데 이는 해당 버전의 ORACLE 을 설치하기 위한 rpm 이 다 구성되어야 설치가 가능하다. (dependency 를 확인할 수 있다.)
[root@oracle64 ~]#
rpm -Uvh
oracle-validated-1.0.0-5.el5.x86_64.rpm warning:
oracle-validated-1.0.0-5.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key
ID 1e5e0159 error: Failed
dependencies: /usr/lib/libc.so is needed by
oracle-validated-1.0.0-5.el5.x86_64 elfutils-libelf-devel is needed by
oracle-validated-1.0.0-5.el5.x86_64 libXp.so.6 is needed by
oracle-validated-1.0.0-5.el5.x86_64 libaio-devel is needed by
oracle-validated-1.0.0-5.el5.x86_64 libdb-4.2.so()(64bit) is needed by
oracle-validated-1.0.0-5.el5.x86_64 libodbc.so.1()(64bit) is needed by
oracle-validated-1.0.0-5.el5.x86_64 libstdc++.so.5 is needed by
oracle-validated-1.0.0-5.el5.x86_64 libstdc++.so.5()(64bit) is needed by
oracle-validated-1.0.0-5.el5.x86_64 sysstat is needed by
oracle-validated-1.0.0-5.el5.x86_64 unixODBC-devel is needed by
oracle-validated-1.0.0-5.el5.x86_64 [root@oracle64 ~]#
yum
install oracle-validated-1.0.0-5.el5.x86_64.rpm Loading
"installonlyn" plugin Setting up Install
Process Setting up
repositories Reading repository
metadata in from local files Parsing package
install arguments Examining
oracle-validated-1.0.0-5.el5.x86_64.rpm: oracle-validated -
1.0.0-5.el5.x86_64 Marking
oracle-validated-1.0.0-5.el5.x86_64.rpm to be installed Resolving
Dependencies --> Populating
transaction set with selected packages. Please wait. ---> Package
oracle-validated.x86_64 0:1.0.0-5.el5 set to be updated --> Running
transaction check --> Processing
Dependency: libdb-4.2.so()(64bit) for package: oracle-validated --> Processing
Dependency: libaio-devel for package: oracle-validated --> Processing
Dependency: libstdc++.so.5()(64bit) for package: oracle-validated --> Processing
Dependency: unixODBC-devel for package: oracle-validated --> Processing
Dependency: libstdc++.so.5 for package: oracle-validated --> Processing
Dependency: elfutils-libelf-devel for package: oracle-validated --> Processing
Dependency: sysstat for package: oracle-validated --> Processing
Dependency: libXp.so.6 for package: oracle-validated --> Processing
Dependency: /usr/lib/libc.so for package: oracle-validated Importing
additional filelist information filelists.xml.gz 100% |=========================|
3.0 MB 00:05 ##################################################
10372/10372 --> Processing
Dependency: libodbc.so.1()(64bit) for package: oracle-validated --> Finished
Dependency Resolution Error: Missing Dependency:
libdb-4.2.so()(64bit) is needed by package oracle-validated Error: Missing Dependency: libaio-devel is
needed by package oracle-validated Error: Missing Dependency: libstdc++.so.5()(64bit)
is needed by package oracle-validated Error: Missing Dependency: unixODBC-devel is
needed by package oracle-validated Error: Missing Dependency: libstdc++.so.5 is
needed by package oracle-validated Error: Missing Dependency:
elfutils-libelf-devel is needed by package oracle-validated Error: Missing Dependency: sysstat is needed
by package oracle-validated Error: Missing Dependency: libXp.so.6 is
needed by package oracle-validated Error: Missing Dependency: /usr/lib/libc.so
is needed by package oracle-validated Error: Missing Dependency:
libodbc.so.1()(64bit) is needed by package oracle-validated |
앞서 구성했던 RPMforge 로는 Dependency 가 해결되지 않는 것을 알 수 있다.
ORACLE 용 Repository 구성을 추가해 다시 진행한다.
[root@oracle64 ~]#
cd
/etc/yum.repos.d [root@oracle64
yum.repos.d]# ls createrepo-0.4.4-2.fc6.noarch.rpm mirrors-rpmforge-extras rpmforge.repo mirrors-rpmforge mirrors-rpmforge-testing [root@oracle64
yum.repos.d]# wget
http://public-yum.oracle.com/public-yum-el5.repo --19:01:10-- http://public-yum.oracle.com/public-yum-el5.repo Resolving
public-yum.oracle.com... 141.146.44.34 Connecting to
public-yum.oracle.com|141.146.44.34|:80... connected. HTTP request sent,
awaiting response... 200 OK Length: 2308
(2.3K) [text/plain] Saving to:
`public-yum-el5.repo' 100%[===========================================>]
2,308 --.-K/s in 0s
19:01:11 (105
MB/s) - `public-yum-el5.repo' saved [2308/2308] [root@oracle64 ~]#
vi
/etc/yum.conf [main] cachedir=/var/cache/yum keepcache=0 debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release tolerant=1 exactarch=1 obsoletes=1 gpgcheck=1 plugins=1 metadata_expire=1800 # PUT YOUR REPOS
HERE OR IN separate files named file.repo #in
/etc/yum.repos.d/public-yum-el5.repo [el5_u5_base] name=Enterprise Linux $releasever U5 -
$basearch - base baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/5/base/$basearch/ gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5 gpgcheck=1 enabled=1 |
위의 [el5_u5_base] 에 대한 셋팅은 (http://gergerconsulting.blogspot.com/2010/10/installing-oracle-10g-r2-using-oracle.html)
를 참고하였다. 굳이 이 자리에 다시 이야기 한 것은 저 셋팅을 몰라 수시간을 보냈기 때문이다
ㅡ..ㅡ
/*+ /etc/yum.conf setting 에 대한 상세 */
Repository 에 대한 Setting 이 끝나고 다시 install 을
실시하면 Dependency 와 엮여 있는 rpm 을 알아서
설치하는 것을 볼 수 있다.
* 참고로 아래 수행중
발생한 에러는 yum update glibc 로 해결하였다. *
[root@oracle64 ~]#
yum install oracle-validated-1.0.0-5.el5.x86_64.rpm Loading
"installonlyn" plugin Repository
el5_u5_base is listed more than once in the configuration Setting up Install
Process Setting up
repositories el5_u5_base 100%
|=========================| 1.1 kB
00:00 Reading repository
metadata in from local files primary.xml.gz 100% |=========================|
1.1 MB 00:12 ##################################################
4372/4372 Parsing package
install arguments Examining
oracle-validated-1.0.0-5.el5.x86_64.rpm: oracle-validated - 1.0.0-5.el5.x86_64 Marking
oracle-validated-1.0.0-5.el5.x86_64.rpm to be installed Resolving
Dependencies --> Populating
transaction set with selected packages. Please wait. ---> Package
oracle-validated.x86_64 0:1.0.0-5.el5 set to be updated --> Running
transaction check --> Processing
Dependency: libdb-4.2.so()(64bit) for package: oracle-validated --> Processing
Dependency: libstdc++.so.5()(64bit) for package: oracle-validated --> Processing
Dependency: unixODBC-devel for package: oracle-validated --> Processing
Dependency: libstdc++.so.5 for package: oracle-validated --> Processing
Dependency: elfutils-libelf-devel for package: oracle-validated --> Processing
Dependency: libXp.so.6 for package: oracle-validated --> Processing
Dependency: /usr/lib/libc.so for package: oracle-validated Importing
additional filelist information filelists.xml.gz 100% |=========================|
3.0 MB 00:53 ##################################################
4372/4372 --> Processing
Dependency: libodbc.so.1()(64bit) for package: oracle-validated --> Restarting
Dependency Resolution with new changes. --> Populating
transaction set with selected packages. Please wait. --->
Downloading header for unixODBC to pack into transaction set. unixODBC-2.2.11-7.1.x86_6
100% |=========================| 28
kB 00:00 ---> Package
unixODBC.x86_64 0:2.2.11-7.1 set to be updated --->
Downloading header for compat-db to pack into transaction set. compat-db-4.2.52-5.1.x86_
100% |=========================| 13
kB 00:00 ---> Package
compat-db.x86_64 0:4.2.52-5.1 set to be updated --->
Downloading header for unixODBC-devel to pack into transaction set. unixODBC-devel-2.2.11-7.1
100% |=========================| 16
kB 00:00 ---> Package
unixODBC-devel.x86_64 0:2.2.11-7.1 set to be updated --->
Downloading header for glibc-devel to pack into transaction set. glibc-devel-2.5-49.x86_64
100% |=========================| 115 kB
00:01 ---> Package
glibc-devel.x86_64 0:2.5-49 set to be updated --->
Downloading header for elfutils-libelf-devel to pack into transaction set. elfutils-libelf-devel-0.1
100% |=========================| 17
kB 00:00 ---> Package
elfutils-libelf-devel.x86_64 0:0.137-3.el5 set to be updated --->
Downloading header for compat-libstdc++-33 to pack into transaction set. compat-libstdc++-33-3.2.3
100% |=========================| 7.2 kB
00:00 ---> Package
compat-libstdc++-33.x86_64 0:3.2.3-61 set to be updated --->
Downloading header for compat-libstdc++-33 to pack into transaction set. compat-libstdc++-33-3.2.3
100% |=========================| 7.2 kB
00:00 ---> Package
compat-libstdc++-33.i386 0:3.2.3-61 set to be updated --->
Downloading header for libXp to pack into transaction set. libXp-1.0.0-8.1.el5.i386.
100% |=========================| 6.9 kB
00:00 ---> Package
libXp.i386 0:1.0.0-8.1.el5 set to be updated --> Running
transaction check --> Processing
Dependency: elfutils-libelf-devel-static-x86_64 = 0.137-3.el5 for package:
elfutils-libelf-devel --> Processing
Dependency: glibc-headers = 2.5-49 for package: glibc-devel --> Processing
Dependency: elfutils-libelf-x86_64 = 0.137-3.el5 for package:
elfutils-libelf-devel --> Processing
Dependency: /usr/lib/libc.so for package: oracle-validated --> Processing
Conflict: elfutils-libelf conflicts elfutils-libelf-devel > 0.125-3.el5 --> Processing
Dependency: glibc = 2.5-49 for package: glibc-devel --> Restarting
Dependency Resolution with new changes. --> Populating
transaction set with selected packages. Please wait. ---> Downloading
header for elfutils-libelf-devel-static to pack into transaction set. elfutils-libelf-devel-sta
100% |=========================| 17
kB 00:00 ---> Package
elfutils-libelf-devel-static.x86_64 0:0.137-3.el5 set to be updated --->
Downloading header for glibc to pack into transaction set. glibc-2.5-49.x86_64.rpm 100% |=========================| 150
kB 00:01 ---> Package
glibc.x86_64 0:2.5-49 set to be updated --->
Downloading header for elfutils-libelf to pack into transaction set. elfutils-libelf-0.137-3.e
100% |=========================| 18
kB 00:00 ---> Package
elfutils-libelf.x86_64 0:0.137-3.el5 set to be updated --->
Downloading header for glibc-headers to pack into transaction set. glibc-headers-2.5-49.x86_
100% |=========================| 148 kB
00:01 ---> Package
glibc-headers.x86_64 0:2.5-49 set to be updated --> Running
transaction check --> Processing
Dependency: /usr/lib/libc.so for package: oracle-validated --> Processing
Dependency: elfutils-libelf = 0.125-3.el5 for package: elfutils-libs --> Processing
Dependency: glibc-common = 2.5-49 for package: glibc --> Restarting
Dependency Resolution with new changes. --> Populating
transaction set with selected packages. Please wait. --->
Downloading header for glibc-common to pack into transaction set. glibc-common-2.5-49.x86_6
100% |=========================| 729 kB
00:05 ---> Package
glibc-common.x86_64 0:2.5-49 set to be updated --->
Downloading header for elfutils-libs to pack into transaction set. elfutils-libs-0.137-3.el5
100% |=========================| 22
kB 00:00 ---> Package
elfutils-libs.x86_64 0:0.137-3.el5 set to be updated --> Running
transaction check --> Processing
Dependency: /usr/lib/libc.so for package: oracle-validated --> Processing
Dependency: glibc-common = 2.5-12 for package: glibc Error: No Package Matching glibc.i686 |
A. YUM 의 정의 | http://ko.wikipedia.org/wiki/Yum
B. Repository 설정 | http://dag.wieers.com/rpm/FAQ.php#B
C. nixCraft | yum Fedora Linux Howto | http://nixcraft.com/getting-started-tutorials/233-yum-fedora-linux-howto.html
D. YUM | YUM Download | http://yum.baseurl.org/
E.
MXWest@westwideweb.com |
Installing git on Red Hat Enterprise Linux(RHEL5) | http://www.westwideweb.com/wp/2009/11/09/installing-git-on-red-hat-enterprise-linux-rhel5/
F. gerger | THURSDAY, OCTOBER 28, 2010 | Installing
Oracle 10g R2 Using Oracle Public Yum Repository on 64 Bit Oracle Enterprise
Linux| http://gergerconsulting.blogspot.com/2010/10/installing-oracle-10g-r2-using-oracle.html