TOP >
Redhat系Linux > yumの設定
yumの設定
更新日:2007-10-31 うまく印刷できないときは…
●実行環境:Redhat9
インストール/設定するもの:yum
サポートの終わっているRedhat9をyumでアップデートする方法です。
まずはyumのインストール。
#
rpm -ivh http://download.fedora.us/fedora/redhat/9/i386/RPMS.stable/yum-2.0.3-0.fdr.1.rh90.noarch.rpm
GnuPGもインストールしておきましょう。
#
rpm -Uvh http://download.fedoralegacy.org/redhat/9/updates/i386/gnupg-1.2.1-9.i386.rpm
インストールが完了すると/etc/yum.confファイルが出来上がってきます。そのままでもよいのですが、少し編集します。
[redhat-os]
name=Red Hat Linux $releasever ($basearch)
baseurl=
# http://download.fedora.us/fedora/redhat/$releasever/$basearch/yum/os/ ←コメント
http://riksun.riken.go.jp/pub/Linux/fedoralegacy/redhat/$releasever/os/$basearch/ ←追加
[redhat-updates]
name=Red Hat Linux $releasever ($basearch) updates
baseurl=
# http://download.fedora.us/fedora/redhat/$releasever/$basearch/yum/updates/ ←コメント
http://riksun.riken.go.jp/pub/Linux/fedoralegacy/redhat/$releasever/updates/$basearch/
アップデートを始める前に、以下の3行を実行しておきます。
#
rpm --import http://www.fedoralegacy.org/FEDORA-LEGACY-GPG-KEY
#
rpm --import /usr/share/doc/yum-2.0.3/*GPG-KEY
#
rpm --import /usr/share/rhn/RPM-GPG-KEY
これでインストールは完了です。yumのコマンドを使用してアップデートができると思います。
yumで私がよく使うコマンドは以下の通り。
| yumのコマンド |
| yum check-update | アップデートされているパッケージの一覧 |
| yum install パッケージ名 | 指定したパッケージのインストール |
| yum list | インストール可能なパッケージの一覧 |
| yum remove パッケージ名 | 指定したパッケージのアンインストール |
| yum update | すべてのパッケージをアップデート |
| yum update パッケージ名 | 指定したパッケージをアップデート |
yumの設定 について質問する
TOP > Redhat系Linux > yumの設定