Linux Security: 第6章 - ソフトウェアのアップデート

| ← |

6.7 rpm によるアップデート

rpm -V の実行例

[root@cent580 ~]# rpm -V httpd
S.5....T  c /etc/httpd/conf/httpd.conf
.....UG.    /var/www/html
マークの意味
MarkDescription
SSize
MFile mode (permission)
5MD5 Checksum
DDevice file major/minor number
LSymbolic linked to
UFile owner's UID
GFile owner's GID
TLast modified time

6.9 yum の設定

yum 設定例
  1. CentOS Extras リポジトリの追加 (/etc/yum.repo.d/CentOS-Base.repo)
    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
    #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
    enabled=1	# 0 から 1で有効化
    
    実行例
    [root@cent580 yum.repos.d]# yum repolist
    Loading mirror speeds from cached hostfile
     * base: ftp.iij.ad.jp
     * centosplus: ftp.iij.ad.jp
     * epel: sg.fedora.ipserverone.com
     * extras: ftp.iij.ad.jp
     * updates: ftp.iij.ad.jp
    リポジトリー ID        リポジトリー名                                     状態
    base/7/x86_64          CentOS-7 - Base                                     9,911
    centosplus/7/x86_64    CentOS-7 - Plus                                        93
    extras/7/x86_64        CentOS-7 - Extras                                     432
    updates/7/x86_64       CentOS-7 - Updates                                  1,614
    repolist: 24,787
    
  2. 外部のリポジトリ追加 (EPEL)
    [root@cent580 yum.repos.d]# yum install epel-release
    	:
    [root@cent580 yum.repos.d]# yum repolist
    	:
    epel/x86_64            Extra Packages for Enterprise Linux 7 - x86_64     12,737
    
    * 外部リポジトリは標準リポジトリと競合する事があるため、不要な場合は enabled を 0 にし無効化しておくこと

  3. YUM のプロキシー越え (/etc/yum.conf)
    # PUT YOUR REPOS HERE OR IN separate files named file.repo
    # in /etc/yum.repos.d
    proxy=プロキシーのURL (http://proxy:8080 など)
    proxy_username=認証ユーザ名
    proxy_password=認証パスワード