WebARENAのVPSサーバー設定メモ(3)


rpmforgeリポジトリ のチェック

rpmforgeリポジトリのインストールを行います。
まずはインストールされているかの確認です。

IT/WEB業界への転職なら求人サイトGreen


[root@localhost ~]# yum list | grep rpmforge-release
rpmforge-release.x86_64                    0.5.1-1.el5.rf              installed
← インストール済み

最新版の確認

rpmforgeリポジトリ のインストール

インストールされていなければインストールを行います。

[root@localhost ~]# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
← GPGキーのインストール

[root@localhost ~]# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
← rpmforgeリポジトリダウンロード
--2010-08-25 22:45:50--  http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
Resolving packages.sw.be... 85.13.226.40
Connecting to packages.sw.be|85.13.226.40|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://rpmforge.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm [following]
--2010-08-25 22:45:52--  http://rpmforge.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
Resolving rpmforge.sw.be... 85.13.226.40
Reusing existing connection to packages.sw.be:80.
HTTP request sent, awaiting response... 200 OK
Length: 16575 (16K) [application/x-rpm]
Saving to: `rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm'

100%[======================================>] 16,575      21.9K/s   in 0.7s    

2010-08-25 22:45:54 (21.9 KB/s) - `rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm' saved [16575/16575]

[root@localhost ~]# rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm 
← rpmforgeリポジトリインストール
Preparing...                ########################################### [100%]
   1:rpmforge-release       ########################################### [100%]

[root@localhost ~]# rm -f rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm 
← 掃除

yum-priorities パッケージを導入する

リポジトリの優先度を指定することができるyum-priorities パッケージをインストールします。

[root@localhost ~]# yum install yum-priorities
Loaded plugins: downloadonly, fastestmirror
Loading mirror speeds from cached hostfile
 * addons: rsync.atworks.co.jp
 * base: rsync.atworks.co.jp
 * extras: rsync.atworks.co.jp
 * updates: rsync.atworks.co.jp
Excluding Packages in global exclude list
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package yum-priorities.noarch 0:1.1.16-14.el5.centos.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch        Version                        Repository
                                                                           Size
================================================================================
Installing:
 yum-priorities      noarch      1.1.16-14.el5.centos.1         base       14 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 14 k
Is this ok [y/N]: y
Downloading Packages:
yum-priorities-1.1.16-14.el5.centos.1.noarch.rpm         |  14 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : yum-priorities                                           1/1 

Installed:
  yum-priorities.noarch 0:1.1.16-14.el5.centos.1                                

Complete!
[root@localhost ~]#

基本リポジトリのデフォルト設定

リポジトリの優先度に関する設定は、1 〜 99 の範囲を設定します。
CentOS の公式リポジトリ(base, updates, addons, extras, centosplus)は優先度を高くし、それ以外の野良リポジトリなどは優先度を低く設定します。

[root@localhost ~]# vim /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1 ←  追加

#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1 ←  追加

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1 ←  追加

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1 ←  追加

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

RPMforge を yum の対象にするには

enablerepoオプションにrpmforgeを指定します。

[root@localhost ~]# yum --enablerepo=rpmforge search lighttpd

 

この記事が気に入ったら
いいね!しよう

最新情報をお届けします

follow us in feedly