[LHR]: package を管理する (yum)

<Home> → <LHR> → <[LHR]: package を管理する (yum)>

はじめに

yum(Yellow dog Updater, Modified) は Yellow Dog Linux で採用されているパッケージ管理ソフトウェアです。

yum は rpm を使用したパッケージ管理ソフトウェアのフロントエンドとして動作します。雰囲気としては <APT> と似たような動作をするようです。

私は、Red Hat の Desktop Linux、Fedora で採用されたことで知りました。apt と比べリポジトリ更新は遅いようですが、yum にしかない機能もあって魅力的なツールです。rpm を管理するのは yum の方が良いような気すらしています。


基本的な使い方

package のリポジトリ情報を更新します (yum check-update)

# yum check-update

Install されている package を最新に置き換えます (yum update)

リポジトリ情報より update する package を選択し、update します。リポジトリ情報が更新されていない場合、更新も自動的に行われます。

# yum update

Install されている package の全 List を表示します (yum list installed)

全リポジトリ情報の List を表示する場合には「yum list」を使用します。

# yum list installed

使用例

bluez-utils (Fedora Core 1) を Install する例を挙げます。

インストール前に package の確認をします (yum info)

# yum info bluez-utils
Gathering header information file(s) from server(s)
Server: Fedora Core 1 - i386 - Base
Server: Fedora Core 1 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Looking in Available Packages:
Name : bluez-utils
Arch : i386
Version: 2.3
Release: 14
Size : 143.17 kB
Group : アプリケーション/システム
Repo : Fedora Core 1 - i386 - Base
Summary: Bluetoothユーティリティ
Description:
Bluetoothユーティリティ(bluez-utils):
- hcitool
- hciattach
- hciconfig
- hcid
- l2ping
- start scripts (RedHat)
- pcmcia設定ファイル

BLUETOOTH 商標はBluetooth SIG, Inc., U.S.A.の所有です。

package 内に提供されているファイルを表示します (yum provides)

# yum provides bluez-utils
Gathering header information file(s) from server(s)
Server: Fedora Core 1 - i386 - Base
Server: Fedora Core 1 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Looking in available packages for a providing package
Available package: bluez-utils.i386 0:2.3-14 from base matches with
/usr/share/doc/bluez-utils-2.3
Available package: bluez-utils.i386 0:2.3-14 from base matches with
/usr/share/doc/bluez-utils-2.3/AUTHORS
Available package: bluez-utils.i386 0:2.3-14 from base matches with
/usr/share/doc/bluez-utils-2.3/COPYING
Available package: bluez-utils.i386 0:2.3-14 from base matches with
/usr/share/doc/bluez-utils-2.3/ChangeLog
Available package: bluez-utils.i386 0:2.3-14 from base matches with
/usr/share/doc/bluez-utils-2.3/INSTALL
Available package: bluez-utils.i386 0:2.3-14 from base matches with
/usr/share/doc/bluez-utils-2.3/NEWS
Available package: bluez-utils.i386 0:2.3-14 from base matches with
/usr/share/doc/bluez-utils-2.3/README
Available package: bluez-utils.i386 0:2.3-14 from base matches with
/usr/share/doc/bluez-utils-2.3/
Available package: bluez-utils.i386 0:2.3-14 from base matches with
config(bluez-utils)
Available package: bluez-utils.i386 0:2.3-14 from base matches with
bluez-utils
10 results returned
Looking in installed packages for a providing package
No packages found

package ファイルを検索します (yum search)

キーワードにワイルドカードが使用出来ます。

# yum search bluez*
Gathering header information file(s) from server(s)
Server: Fedora Core 1 - i386 - Base
Server: Fedora Core 1 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Looking in available packages for a providing package
Available package: bluez-pin.i386 0:0.20-1 from base matches with
bluez-pin
Available package: bluez-bluefw.i386 0:0.9-2 from base matches with
bluez-bluefw
Available package: bluez-hcidump.i386 0:1.5-3 from base matches with
bluez-hcidump
Available package: bluez-utils.i386 0:2.3-14 from base matches with
bluez-utils
Available package: bluez-sdp-devel.i386 0:1.5-1 from base matches with
bluez-sdp-devel
Available package: bluez-sdp.i386 0:1.5-1 from base matches with
bluez-sdp
Available package: bluez-pan.i386 0:1.1-2 from base matches with
bluez-pan
Available package: bluez-libs.i386 0:2.4-2 from base matches with
bluez-libs
Available package: bluez-libs-devel.i386 0:2.4-2 from base matches with
bluez-libs-devel
9 results returned
Looking in installed packages for a providing package
No packages found

package ファイルを Install します (yum install)

Install 途中、bluez-utils を Install するには bluez-libs が必要との警告が出力されました。「y」キーを押して bluez-libs も Install することで Install が出来ました。

# yum install bluez-utils
Gathering header information file(s) from server(s)
Server: Fedora Core 1 - i386 - Base
Server: Fedora Core 1 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
.Dependencies resolved
I will do the following:
[install: bluez-utils 2.3-14.i386]
I will install/upgrade these to satisfy the dependencies:
[deps: bluez-libs 2.4-2.i386]
Is this ok [y/N]: y
Getting bluez-libs-2.4-2.i386.rpm
bluez-libs-2.4-2.i386.rpm 100% |=========================| 20 kB 00:00
Getting bluez-utils-2.3-14.i386.rpm
bluez-utils-2.3-14.i386.r 100% |=========================| 70 kB 00:01
Running test transaction:
Test transaction complete, Success!
bluez-libs 100 % done 1/2
bluez-utils 100 % done 2/2
Installed: bluez-utils 2.3-14.i386
Dep Installed: bluez-libs 2.4-2.i386
Transaction(s) Complete

Resource

お勧め

Tips


<Home> → <LHR> → <[LHR]: package を管理する (yum)>
Copyright (c) 2003 Makoto NARA (Mc.N), All rights reserved.
<Terms of Use>

Valid CSS! Valid HTML 4.01!