虽然有些晚了,但是我现在才发现Yum (^^;)

首先。

在进行本次验证时,我们删除了 CentOS-Media.repo 文件,因为它会导致在执行 yum –enablerepo=* 命令时,操作会失败,这个命令是以所有仓库为目标进行操作的。

[root@master1 yum.repos.d]# pwd
/etc/yum.repos.d
[root@master1 yum.repos.d]# ls CentOS-Media.repo
CentOS-Media.repo

[root@master1 yum.repos.d]# rm CentOS-Media.repo
rm: 通常ファイル `CentOS-Media.repo' を削除しますか? y

[root@master1 yum.repos.d]# ls CentOS-Media.repo
ls: CentOS-Media.repo にアクセスできません: そのようなファイルやディレクトリはありません
[root@master1 yum.repos.d]#

1. 验证环境

[root@master1 ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

[root@master1 ~]# rpm -qa|grep centos-release
centos-release-7-2.1511.el7.centos.2.10.x86_64

选择日本国内的存储库(包括_only=.jp)。

在仅启用include_only的情况下和禁用jp的情况下,对比访问的域名。当仅启用jp时,发现只能访问jp域名。

-------------------------------------------
1. jpだけを有効にする。
-------------------------------------------
[root@master1 ~]# vi /etc/yum/pluginconf.d/fastestmirror.conf
#include_only=.nl,.de,.uk,.ie
include_only=.jp

yumキャッシュをクリアする。
[root@master1 ~]# yum clean all
読み込んだプラグイン:fastestmirror
リポジトリーを清掃しています: base epel extras updates
Cleaning up everything
Cleaning up list of fastest mirrors

リポジトリを表示する。
[root@master1 ~]# yum repolist
読み込んだプラグイン:fastestmirror
base                                                               | 3.6 kB  00:00:00
epel/x86_64/metalink                                               | 4.6 kB  00:00:00
epel                                                               | 4.3 kB  00:00:00
extras                                                             | 3.4 kB  00:00:00
updates                                                            | 3.4 kB  00:00:00
(1/7): epel/x86_64/group_gz                                        | 170 kB  00:00:09
(2/7): base/7/x86_64/primary_db                                    | 5.6 MB  00:00:12
(3/7): extras/7/x86_64/primary_db                                  | 183 kB  00:00:02
(4/7): epel/x86_64/updateinfo                                      | 706 kB  00:00:14
(5/7): updates/7/x86_64/primary_db                                 | 1.3 MB  00:00:03
(6/7): base/7/x86_64/group_gz                                      | 155 kB  00:00:16
(7/7): epel/x86_64/primary_db                                      | 4.5 MB  00:12:25
Determining fastest mirrors
Including mirror: ftp.riken.jp
Including mirror: ftp.tsukuba.wide.ad.jp
Including mirror: ftp.iij.ad.jp
Including mirror: www.ftp.ne.jp
Including mirror: ftp.jaist.ac.jp
Including mirror: ftp.yz.yamagata-u.ac.jp
Including mirror: mirror.fairway.ne.jp
 * base: ftp.riken.jp
Including mirror: ftp.riken.jp
Including mirror: ftp.jaist.ac.jp
 * epel: ftp.riken.jp
Including mirror: ftp.riken.jp
Including mirror: ftp.tsukuba.wide.ad.jp
Including mirror: ftp.iij.ad.jp
Including mirror: www.ftp.ne.jp
Including mirror: ftp.jaist.ac.jp
Including mirror: ftp.yz.yamagata-u.ac.jp
Including mirror: mirror.fairway.ne.jp
 * extras: ftp.riken.jp
Including mirror: ftp.riken.jp
Including mirror: ftp.tsukuba.wide.ad.jp
Including mirror: ftp.iij.ad.jp
Including mirror: www.ftp.ne.jp
Including mirror: ftp.jaist.ac.jp
Including mirror: ftp.yz.yamagata-u.ac.jp
Including mirror: mirror.fairway.ne.jp
 * updates: ftp.riken.jp
リポジトリー ID                         リポジトリー名                                                  状態
base/7/x86_64                           CentOS-7 - Base                                               9,363
epel/x86_64                             Extra Packages for Enterprise Linux 7 - x86_64               11,019
extras/7/x86_64                         CentOS-7 - Extras                                               435
updates/7/x86_64                        CentOS-7 - Updates                                              433
repolist: 21,250
[root@master1 yum.repos.d]#


-------------------------------------------
2. jpを無効にする。
-------------------------------------------
[root@master1 ~]# vi /etc/yum/pluginconf.d/fastestmirror.conf
include_only=.nl,.de,.uk,.ie

jpドメイン以外にもアクセスしていることがわかる。
[root@master1 ~]# yum repolist
-中略-
Determining fastest mirrors
Including mirror: ftp.tsukuba.wide.ad.jp
Including mirror: mirror.vodien.com
 * base: ftp.tsukuba.wide.ad.jp
 * epel: ftp.jaist.ac.jp
Including mirror: ftp.tsukuba.wide.ad.jp
Including mirror: mirror.vodien.com
Including mirror: download.nus.edu.sg
 * extras: ftp.tsukuba.wide.ad.jp
Including mirror: ftp.tsukuba.wide.ad.jp
Including mirror: download.nus.edu.sg
 * updates: ftp.tsukuba.wide.ad.jp
リポジトリー ID                    リポジトリー名                                                    状態
base/7/x86_64                     CentOS-7 - Base                                                  9,363
epel/x86_64                       Extra Packages for Enterprise Linux 7 - x86_64                  11,042
extras/7/x86_64                   CentOS-7 - Extras                                                  200
updates/7/x86_64                  CentOS-7 - Updates                                                 438
repolist: 21,043
[root@master1 ~]#


查询可用的存储库(repolist,repolist all)


本システム(master1)にインストールされているリポジトリファイル(*.repo)をもとに、有効なリポジトリだけを表示する。
つまり、enabled=1と設定されているリポジトリだけが表示される。
[root@master1 ~]# yum repolist
-中略-

リポジトリー ID                                     リポジトリー名                                                                  状態
base/7/x86_64                                       CentOS-7 - Base                                                                  9,363
epel/x86_64                                         Extra Packages for Enterprise Linux 7 - x86_64                                  11,019
extras/7/x86_64                                     CentOS-7 - Extras                                                                  435
updates/7/x86_64                                    CentOS-7 - Updates                                                                 433
repolist: 21,250
[root@master1 ~]#


本システム(master1)にインストールされているリポジトリファイル(*.repo)をもとに、全てのリポジトリを表示する。
つまり、enabled=0と設定されているリポジトリも表示される。
[root@master1 ~]# yum repolist all
-中略-

リポジトリー ID                    リポジトリー名                                                         状態
!C7.0.1406-base/x86_64             CentOS-7.0.1406 - Base                                                 無効
!C7.0.1406-centosplus/x86_64       CentOS-7.0.1406 - CentOSPlus                                           無効
!C7.0.1406-extras/x86_64           CentOS-7.0.1406 - Extras                                               無効
!C7.0.1406-fasttrack/x86_64        CentOS-7.0.1406 - CentOSPlus                                           無効
!C7.0.1406-updates/x86_64          CentOS-7.0.1406 - Updates                                              無効
!C7.1.1503-base/x86_64             CentOS-7.1.1503 - Base                                                 無効
!C7.1.1503-centosplus/x86_64       CentOS-7.1.1503 - CentOSPlus                                           無効
!C7.1.1503-extras/x86_64           CentOS-7.1.1503 - Extras                                               無効
!C7.1.1503-fasttrack/x86_64        CentOS-7.1.1503 - CentOSPlus                                           無効
!C7.1.1503-updates/x86_64          CentOS-7.1.1503 - Updates                                              無効
base/7/x86_64                      CentOS-7 - Base                                                        有効:  9,363
!base-debuginfo/x86_64             CentOS-7 - Debuginfo                                                   無効
!base-source/7                     CentOS-7 - Base Sources                                                無効
c7-media                           CentOS-7 - Media                                                       無効
centosplus/7/x86_64                CentOS-7 - Plus                                                        無効
centosplus-source/7                CentOS-7 - Plus Sources                                                無効
cr/7/x86_64                        CentOS-7 - cr                                                          無効
epel/x86_64                        Extra Packages for Enterprise Linux 7 - x86_64                         有効: 11,019
epel-debuginfo/x86_64              Extra Packages for Enterprise Linux 7 - x86_64 - Debug                 無効
epel-source/x86_64                 Extra Packages for Enterprise Linux 7 - x86_64 - Source                無効
epel-testing/x86_64                Extra Packages for Enterprise Linux 7 - Testing - x86_64               無効
epel-testing-debuginfo/x86_64      Extra Packages for Enterprise Linux 7 - Testing - x86_64 - Debug       無効
epel-testing-source/x86_64         Extra Packages for Enterprise Linux 7 - Testing - x86_64 - Source      無効
extras/7/x86_64                    CentOS-7 - Extras                                                      有効:    435
!extras-source/7                   CentOS-7 - Extras Sources                                              無効
fasttrack/7/x86_64                 CentOS-7 - fasttrack                                                   無効
updates/7/x86_64                   CentOS-7 - Updates                                                     有効:    433
updates-source/7                   CentOS-7 - Updates Sources                                             無効
repolist: 21,250
[root@master1 ~]#

查看代码库的方法

4.1 查找命令提供源代码库的方法(whatprovides)


[root@master1 ~]# which chronyd
/usr/sbin/chronyd

chronydコマンドの提供元リポジトリを調べる。
base,updatesの2つのリポジトリから提供されていることがわかる。
[root@master1 ~]# yum whatprovides /usr/sbin/chronyd
-中略-

chrony-2.1.1-3.el7.centos.x86_64 : An NTP client/server
リポジトリー        : base
一致          :
ファイル名    : /usr/sbin/chronyd

chrony-2.1.1-4.el7.centos.x86_64 : An NTP client/server
リポジトリー        : updates
一致          :
ファイル名    : /usr/sbin/chronyd

chrony-2.1.1-4.el7.centos.x86_64 : An NTP client/server
リポジトリー        : @updates
一致          :
ファイル名    : /usr/sbin/chronyd


在存储库中搜索包的方法。

确认各个仓库(C7.0,C7.1等)中存在哪些版本的软件包。

-----------------------------------------------------------
1. 事前準備(リポジトリに存在するbashパッケージを確認する)
-----------------------------------------------------------
インストールされているbashパッケージの版数を調べる。
[root@master1 yum.repos.d]# rpm -qa|grep bash
bash-4.2.46-19.el7.x86_64

yumキャッシュをクリアする。
[root@master1 ~]# yum clean all
-以下、略-

利用可能な全リポジトリにあるbashパッケージの版数一覧を調べる。
base,updatesはCentOS7.3のリポジトリを示している(★印)。CentOS7.2のリポジトリにあるbashは表示されない模様。
[root@master1 yum.repos.d]# yum --enablerepo=* --showduplicates list bash
-中略-

利用可能なパッケージ
bash.x86_64               4.2.45-5.el7                     C7.0.1406-base
bash.x86_64               4.2.45-5.el7_0.2                 C7.0.1406-updates
bash.x86_64               4.2.45-5.el7_0.4                 C7.0.1406-updates
bash.x86_64               4.2.46-12.el7                    C7.1.1503-base
bash.x86_64               4.2.46-20.el7_2                  base  ★
bash.x86_64               4.2.46-21.el7_3                  updates ★

-----------------------------------------------------------------
3. CentOS7.0(C7.0)リポジトリに存在するbashパッケージを表示する。
-----------------------------------------------------------------
[root@master1 yum.repos.d]# yum --disablerepo=* --enablerepo=C7.0* --showduplicates list bash
-中略-

インストール済みパッケージ
bash.x86_64               4.2.46-19.el7                     @anaconda
利用可能なパッケージ
bash.x86_64               4.2.45-5.el7                      C7.0.1406-base
bash.x86_64               4.2.45-5.el7_0.2                  C7.0.1406-updates
bash.x86_64               4.2.45-5.el7_0.4                  C7.0.1406-updates

-----------------------------------------------------------------
4. CentOS7.1(C7.1)リポジトリに存在するbashパッケージを表示する。
-----------------------------------------------------------------
[root@master1 yum.repos.d]# yum --disablerepo=* --enablerepo=C7.1* --showduplicates list bash
-中略-

インストール済みパッケージ
bash.x86_64                4.2.46-19.el7                   @anaconda
利用可能なパッケージ
bash.x86_64                4.2.46-12.el7                   C7.1.1503-base

--------------------------------------------------------
5. 最新リポジトリに存在するbashパッケージを表示する。
--------------------------------------------------------
本検証時点の最新リポジトリはCentOS7.3になります。
[root@master1 yum.repos.d]# yum check-update centos-release
-中略-
centos-release.x86_64       7-3.1611.el7.centos           base

最新リポジトリに存在するbashパッケージを表示する。
base,updatesは、CentOS7.2ではなく、CentOS7.3リポジトリを表すことになります(★印)
[root@master1 yum.repos.d]# yum --disablerepo=* --enablerepo=base,updates --showduplicates list bash
-中略-

インストール済みパッケージ
bash.x86_64                  4.2.46-19.el7             @anaconda
利用可能なパッケージ
bash.x86_64                  4.2.46-20.el7_2           base ★
bash.x86_64                  4.2.46-21.el7_3           updates ★
[root@master1 yum.repos.d]#

将特定的软件包从yum更新的目标列表中排除。

通过将/etc/yum.conf中的exclude=<包名称>进行设置,可以将其排除在yum update的范围之外。
以下是将kubernetes-master包排除在更新范围之外的示例。

kubernetes-masterパッケージの版数を調べる。
[root@master1 yum.repos.d]# rpm -qa|grep kubernetes-master
kubernetes-master-1.2.0-0.13.gitec7364b.el7.x86_64

yumキャッシュをクリアする。
[root@master1 yum.repos.d]# yum clean all
-以下、略-

アップデート可能かどうか調べる。アップデート可能だとわかる。
[root@master1 yum.repos.d]# yum check-update kubernetes-master
-中略-
kubernetes-master.x86_64                    1.3.0-0.3.git86dc49a.el7             extras
[root@master1 yum.repos.d]#

kubernetesをアップデート禁止にする。
[root@master1 yum.repos.d]# vi /etc/yum.conf
exclude=kubernetes-master

[root@master1 yum.repos.d]# yum clean all
-以下、略-


アップデート可能かどうか調べる。アップデート可能なパッケージなし。
excludeが機能していることがわかった。
[root@master1 yum.repos.d]# yum check-update kubernetes-master
読み込んだプラグイン:fastestmirror
-中略-

[root@master1 yum.repos.d]#

下载二进制软件包和源代码软件包。

---------------
1. 事前準備
---------------
yumdownloaderコマンドを使うので、事前準備として yum-utilsパッケージをインストールする。
[root@master1 ~]# yum -y install yum-utils
-以下、略-

---------------------------------------
2. バイナリパッケージをダウンロードする
---------------------------------------
[root@master1 ~]# yumdownloader bc
-中略-
bc-1.06.95-13.el7.x86_64.rpm                                                 | 115 kB  00:00:00

ダウンロードしたファイルを確認する。バイナリパッケージがダウンロードできた。
[root@master1 ~]# ls
bc-1.06.95-13.el7.x86_64.rpm

---------------------------------------
3. ソースパッケージをダウンロードする
---------------------------------------
[root@master1 ~]# yumdownloader --source bc
-中略-
bc-1.06.95-13.el7.src.rpm                                          | 301 kB  00:00:04

ダウンロードしたファイルを確認する。ソースパッケージがダウンロードできた。
[root@master1 ~]# ls
bc-1.06.95-13.el7.src.rpm

在执行8 yum命令时发送和接收的数据包

当我执行yum命令时,我查看了流动的数据包。在建立TCP连接后,使用HTTP GET方法下载文件。当文件下载完成后,从仓库返回了HTTP OK。然后断开了TCP连接。

パケットをキャプチャする。
[root@master1 ~]# tcpdump -i eth0 tcp port 80 -w yum.cap

bcパッケージをダウンロードする。
[root@master1 ~]# yumdownloader --source bc

TCPコネクションを確立したあと、HTTTP GETをしてパッケージをダウンロードしている。
ダウンロードが完了すると、リポジトリからHTTP/1.1 200 OK が返ってきていることがわかる。
そのあと、TCPコネクションを終了していることがわかる。

  master1                                                                        リポジトリ
  192.168.0.10                                                                 108.61.16.227
   |                                                                                   |
   |-------------------------- SYN --------------------------------------------------->|
   |<------------------------- SYN + ACK ----------------------------------------------|
   |-------------------------- ACK --------------------------------------------------->|
   |                                                                                   |
   |--- HTTP GET /centos/7/os/Source/SPackages/bc-1.06.95-13.el7.src.rpm HTTP/1.1) --->|
   |                                                                                   |
   |                                                                                   |
   |<------------------------- DATA ---------------------------------------------------|
   |-------------------------- ACK --------------------------------------------------->|
   |                            :                                                      |
   |                         repeat                                                    |
   |                            :                                                      |
   |                                                                                   |
   |<-------------------- HTTP/1.1 200 OK  (application/x-rpm) + FIN ------------------|
   |-------------------------- ACK --------------------------------------------------->|
   |-------------------------- FIN --------------------------------------------------->|
   |<------------------------- ACK ----------------------------------------------------|
   |                                                                                   |

查看9个yum命令的执行历史和执行内容。

--------------------------------------
1. /var/log/yum.logを確認する方法
--------------------------------------
[root@master1 ~]# cat /var/log/yum.log
Jan 04 21:36:50 Erased: flannel-0.5.5-1.el7.x86_64
Jan 10 20:47:50 Installed: flannel-0.2.0-10.el7.x86_64
Jan 10 20:48:30 Erased: flannel-0.2.0-10.el7.x86_64
Jan 10 20:48:42 Installed: flannel-0.2.0-10.el7.x86_64
Jan 10 20:49:27 Erased: flannel-0.2.0-10.el7.x86_64
Jan 10 21:16:32 Installed: flannel-0.2.0-10.el7.x86_64
Jan 10 21:21:34 Erased: flannel-0.2.0-10.el7.x86_64
Jan 10 22:06:08 Installed: flannel-0.2.0-10.el7.x86_64

--------------------------------------
2. yum historyコマンドを使う方法
--------------------------------------
[root@master1 ~]# yum history list
読み込んだプラグイン:fastestmirror
ID     | コマンドライン           | 日時             | 操作           | 変更
-------------------------------------------------------------------------------
    66 | --disablerepo=* --enable | 2017-01-18 17:46 | Downgrade      |    1
    65 | install centos-release   | 2017-01-18 17:42 | Update         |    1
    64 | --disablerepo=* --enable | 2017-01-18 17:16 | Downgrade      |    1
    63 | install centos-release   | 2017-01-18 17:15 | Update         |    1

-以下、略-

------------------------------------------------------
3. yum historyコマンドを使う方法(詳細情報を表示する)
------------------------------------------------------
ID=66の詳細情報を表示する。
[root@master1 ~]# yum history info 66
読み込んだプラグイン:fastestmirror
トランザクション ID : 66
開始時間            : Wed Jan 18 17:46:38 2017
開始 rpmdb          : 455:4dfd34f42517660c2ceb1f96b0d5add3ba57fcf7
終了時間            :            17:46:39 2017 (1 秒)
終了 rpmdb          : 455:251e9bfe6addcc6d45ac52c94a5c37ea0776552d
ユーザー            : root <root>
終了コード          : 成功
コマンドライン      : --disablerepo=* --enablerepo=C7.2.1511* downgrade centos-release
トランザクションの実行:
    インストール rpm-4.11.3-17.el7.x86_64                      @anaconda
    インストール yum-3.4.3-150.el7.centos.noarch               @base
    インストール yum-plugin-fastestmirror-1.1.31-34.el7.noarch @anaconda
切り替えたパッケージ:
    ダウングレード centos-release-7-2.1511.el7.centos.2.10.x86_64 @C7.2.1511-base
    ダウングレード済み                7-3.1611.el7.centos.x86_64      @base
history info
[root@master1 ~]#


--------------------------------------------------
4. yum historyコマンドを使う方法(特定パッケージのみ)
--------------------------------------------------
[root@master1 yum.repos.d]# yum history list flannel
読み込んだプラグイン:fastestmirror
ID     | コマンドライン           | 日時             | 操作           | 変更
-------------------------------------------------------------------------------
    47 | -y install flannel-0.2.0 | 2017-01-10 22:06 | Install        |    1
    46 | -y remove flannel        | 2017-01-10 21:21 | Erase          |    1
    45 | -y install flannel-0.2.0 | 2017-01-10 21:16 | Install        |    1
    44 | -y remove flannel        | 2017-01-10 20:49 | Erase          |    1
-以下、略-

降低10 rpm软件包的版本

誤って、CentOS7.2にCentOS7.3用のcentos-releaseパッケージをインストールしてしまった。
[root@master1 yum.repos.d]# rpm -qa|grep centos-release
centos-release-7-3.1611.el7.centos.x86_64
[root@master1 yum.repos.d]#

rpmパッケージをダウングレードをする。
しかし、現時点ではCentOS7.3が最新リポジトリなので、ダウングレードできない。
[root@master1 yum.repos.d]# yum downgrade centos-release
-中略-
何もしません
[root@master1 yum.repos.d]#

全リポジトリ(7.0から7.2)のcentos-releaseパッケージの版数を表示する。enablerepoに"c7*"と指定する。
[root@master1 yum.repos.d]# yum --disablerepo=* --enablerepo=C7* --showduplicates list  centos-release
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
インストール済みパッケージ
centos-release.x86_64              7-3.1611.el7.centos                   @base
利用可能なパッケージ
centos-release.x86_64              7-0.1406.el7.centos.2.3               C7.0.1406-base
centos-release.x86_64              7-0.1406.el7.centos.2.4               C7.0.1406-updates
centos-release.x86_64              7-0.1406.el7.centos.2.5               C7.0.1406-updates
centos-release.x86_64              7-0.1406.el7.centos.2.6               C7.0.1406-updates
centos-release.x86_64              7-1.1503.el7.centos.2.8               C7.1.1503-base
centos-release.x86_64              7-1.1503.el7.centos.2.8               C7.1.1503-updates
centos-release.x86_64              7-2.1511.el7.centos.2.10              C7.2.1511-base
[root@master1 yum.repos.d]#


CentOS7.2リポジトリにあるcentos-releaseパッケージにダウングレードする。
enablerepoに"C7.2.1511*"と指定する。
[root@master1 yum.repos.d]# yum --disablerepo=* --enablerepo=C7.2.1511* downgrade centos-release
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ centos-release.x86_64 0:7-2.1511.el7.centos.2.10 を ダウングレード
---> パッケージ centos-release.x86_64 0:7-3.1611.el7.centos を 削除
--> 依存性解決を終了しました。

依存性を解決しました

================================================================================================
 Package               アーキテクチャー   バージョン                   リポジトリー        容量
================================================================================================
ダウングレード中:
 centos-release        x86_64             7-2.1511.el7.centos.2.10     C7.2.1511-base      23 k

トランザクションの要約
=================================================================================================
ダウングレード  1 パッケージ

総ダウンロード容量: 23 k
Is this ok [y/d/N]: y
Downloading packages:
centos-release-7-2.1511.el7.centos.2.10.x86_64.rpm                   |  23 kB  00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  インストール中          : centos-release-7-2.1511.el7.centos.2.10.x86_64          1/2
  整理中                  : centos-release-7-3.1611.el7.centos.x86_64               2/2
  検証中                  : centos-release-7-2.1511.el7.centos.2.10.x86_64          1/2
  検証中                  : centos-release-7-3.1611.el7.centos.x86_64               2/2

削除しました:
  centos-release.x86_64 0:7-3.1611.el7.centos

インストール:
  centos-release.x86_64 0:7-2.1511.el7.centos.2.10

完了しました!
[root@master1 yum.repos.d]#


パッケージ版数を確認する。
centos-releaseパッケージの版数が7-2になっている。ダウングレードできた。
[root@master1 yum.repos.d]# rpm -qa|grep centos-release
centos-release-7-2.1511.el7.centos.2.10.x86_64
[root@master1 yum.repos.d]#


关于11个镜像列表

当访问repo文件的mirrorlist指定的URL时,将获得存储库服务器的列表。
在列表中,似乎会选择延迟最小的服务器。

11.1 CentOS-Base.repo的镜像列表

変数は以下のものを指定する。
- release は CentOS のメジャーバージョン(7や6)
- arch は i386 や x86_64 などのアーキテクチャ
- repo はリポジトリの種類(os,updates,extras,centosplus)

CentOS-Base.repoに登録されているミラーリストのURLは以下のとおり。
リポジトリ(os,updates,extras,centosplus)毎にミラーリストが登録されている。
[root@master1 ~]# grep mirrorlist /etc/yum.repos.d/CentOS-Base.repo
# If the mirrorlist= does not work for you, as a fall back you can try the
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
[root@master1 ~]#

------------------------------------------------
1. base(os)リポジトリのミラーリスト一覧を調べる
------------------------------------------------
[root@master1 ~]# curl 'http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra='
http://ftp.tsukuba.wide.ad.jp/Linux/centos/7.3.1611/os/x86_64/
http://www.ftp.ne.jp/Linux/packages/CentOS/7.3.1611/os/x86_64/
http://mirror.fairway.ne.jp/centos/7.3.1611/os/x86_64/
http://ftp.yz.yamagata-u.ac.jp/pub/linux/centos/7.3.1611/os/x86_64/
http://ftp.riken.jp/Linux/centos/7.3.1611/os/x86_64/
http://ftp.iij.ad.jp/pub/linux/centos/7.3.1611/os/x86_64/
http://ftp.jaist.ac.jp/pub/Linux/CentOS/7.3.1611/os/x86_64/
http://centos.usonyx.net/main/7.3.1611/os/x86_64/
http://download.nus.edu.sg/mirror/centos/7.3.1611/os/x86_64/
http://mirror.0x.sg/centos/7.3.1611/os/x86_64/
[root@master1 ~]#

-----------------------------------------------
2. updatesリポジトリのミラーリスト一覧を調べる
-----------------------------------------------
[root@master1 ~]# curl 'http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates&infra='
http://ftp.riken.jp/Linux/centos/7.3.1611/updates/x86_64/
http://ftp.jaist.ac.jp/pub/Linux/CentOS/7.3.1611/updates/x86_64/
http://ftp.yz.yamagata-u.ac.jp/pub/linux/centos/7.3.1611/updates/x86_64/
http://ftp.iij.ad.jp/pub/linux/centos/7.3.1611/updates/x86_64/
http://www.ftp.ne.jp/Linux/packages/CentOS/7.3.1611/updates/x86_64/
http://ftp.tsukuba.wide.ad.jp/Linux/centos/7.3.1611/updates/x86_64/
http://mirror.vodien.com/centos/7.3.1611/updates/x86_64/
http://download.nus.edu.sg/mirror/centos/7.3.1611/updates/x86_64/
http://mirror.qoxy.com/centos/7.3.1611/updates/x86_64/
http://mirror.0x.sg/centos/7.3.1611/updates/x86_64/
[root@master1 ~]#

-----------------------------------------------
3. extrasリポジトリのミラーリスト一覧を調べる
-----------------------------------------------
[root@master1 ~]# curl 'http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra='
http://ftp.tsukuba.wide.ad.jp/Linux/centos/7.3.1611/extras/x86_64/
http://ftp.yz.yamagata-u.ac.jp/pub/linux/centos/7.3.1611/extras/x86_64/
http://ftp.riken.jp/Linux/centos/7.3.1611/extras/x86_64/
http://ftp.iij.ad.jp/pub/linux/centos/7.3.1611/extras/x86_64/
http://ftp.jaist.ac.jp/pub/Linux/CentOS/7.3.1611/extras/x86_64/
http://www.ftp.ne.jp/Linux/packages/CentOS/7.3.1611/extras/x86_64/
http://download.nus.edu.sg/mirror/centos/7.3.1611/extras/x86_64/
http://mirror.0x.sg/centos/7.3.1611/extras/x86_64/
http://mirror.vastspace.net/centos/7.3.1611/extras/x86_64/
http://mirror.qoxy.com/centos/7.3.1611/extras/x86_64/
[root@master1 ~]#

-----------------------------------------------
4. centosplusリポジトリのミラーリスト一覧を調べる
----------------------------------------------
[root@master1 ~]# curl 'http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=centosplus&infra='
http://mirror.fairway.ne.jp/centos/7.3.1611/centosplus/x86_64/
http://ftp.tsukuba.wide.ad.jp/Linux/centos/7.3.1611/centosplus/x86_64/
http://www.ftp.ne.jp/Linux/packages/CentOS/7.3.1611/centosplus/x86_64/
http://ftp.iij.ad.jp/pub/linux/centos/7.3.1611/centosplus/x86_64/
http://ftp.riken.jp/Linux/centos/7.3.1611/centosplus/x86_64/
http://ftp.yz.yamagata-u.ac.jp/pub/linux/centos/7.3.1611/centosplus/x86_64/
http://ftp.jaist.ac.jp/pub/Linux/CentOS/7.3.1611/centosplus/x86_64/
http://mirror.vodien.com/centos/7.3.1611/centosplus/x86_64/
http://download.nus.edu.sg/mirror/centos/7.3.1611/centosplus/x86_64/
http://mirror.qoxy.com/centos/7.3.1611/centosplus/x86_64/
[root@master1 ~]#

11.2 EPEL镜像列表

[root@master1 ~]# curl 'https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=x86_64'
<?xml version="1.0" encoding="utf-8"?>
<metalink version="3.0" xmlns="http://www.metalinker.org/" type="dynamic" pubdate="Thu, 19 Jan 2017 01:24:27 GMT" generator="mirrormanager" xmlns:mm0="http://fedorahosted.org/mirrormanager">
  <files>
    <file name="repomd.xml">
      <mm0:timestamp>1484693042</mm0:timestamp>
      <size>4380</size>
      <verification>
        <hash type="md5">002b06bfffa009b8276b2b89f1b2ac9a</hash>
        <hash type="sha1">ed1769ffbe2ff28a84c1dea2fd3487e72b076418</hash>
        <hash type="sha256">8cd91ff7377feaf93763586d79fb4d4fa5e34222b2d294ed426d75f7962d7866</hash>
        <hash type="sha512">a2ce39fa50341ba5d339b1872fd71cfaa69c86b5e86b6c34318eb9bc1d71a74192ff468de134625f8118451a81c2d06559bd1cc1aa414ccce752dd4cde2008bb</hash>
      </verification>
      <mm0:alternates>
        <mm0:alternate>
            <mm0:timestamp>1484586449</mm0:timestamp>
            <size>4380</size>
            <verification>
              <hash type="md5">555195f5b7cb58d0d28e0678c29e6d72</hash>
              <hash type="sha1">d531faf7c4fc65725300c478daa5eac2304995c0</hash>
              <hash type="sha256">8703524bb7fd15e3ccc012c769c99fdecea7332ac54473e905a3d978e2adbad9</hash>
              <hash type="sha512">bd7dc2e72b3dd0237c237d33484181747b7421fc54fccf7e4f6263c9ab767be62912d854143f67eba024b767a79e88b862f0ee04ec3f3a333af872c62e6ce2a9</hash>
            </verification>
        </mm0:alternate>
      </mm0:alternates>
      <resources maxconnections="1">
        <url protocol="http" type="http" location="JP" preference="100" >http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="rsync" type="rsync" location="JP" preference="100" >rsync://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="JP" preference="99" >http://ftp.riken.jp/Linux/fedora/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="rsync" type="rsync" location="JP" preference="99" >rsync://ftp.riken.jp/fedora/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="ID" preference="98" >http://kodeterbuka.beritagar.id/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="ID" preference="97" >http://kartolo.sby.datautama.net.id/EPEL/7/x86_64/repodata/repomd.xml</url>
        <url protocol="rsync" type="rsync" location="ID" preference="97" >rsync://kartolo.sby.datautama.net.id/EPEL/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="HK" preference="96" >http://ftp.cuhk.edu.hk/pub/linux/fedora-epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="IN" preference="95" >http://epel.mirror.net.in/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="ID" preference="94" >http://epel.mirror.angkasa.id/pub/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="https" type="https" location="ID" preference="94" >https://epel.mirror.angkasa.id/pub/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="rsync" type="rsync" location="ID" preference="94" >rsync://epel.mirror.angkasa.id/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="PH" preference="93" >http://mirror.pregi.net/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="https" type="https" location="PH" preference="93" >https://mirror.pregi.net/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="https" type="https" location="CN" preference="92" >https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="rsync" type="rsync" location="CN" preference="92" >rsync://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="CN" preference="92" >http://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="IQ" preference="91" >http://epel.scopesky.iq/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="IR" preference="90" >http://repo.fedoralinux.ir/pub/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="https" type="https" location="IR" preference="90" >https://repo.fedoralinux.ir/pub/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="PH" preference="89" >http://mirror.rise.ph/fedora-epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="CN" preference="88" >http://mirror.lzu.edu.cn/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="https" type="https" location="CN" preference="88" >https://mirror.lzu.edu.cn/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="KR" preference="87" >http://mirror.premi.st/epel/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="TW" preference="86" >http://mirror01.idc.hinet.net/EPEL/7/x86_64/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="VN" preference="85" >http://mirror.ehost.vn/epel/7/x86_64/repodata/repomd.xml</url>
      </resources>
    </file>
  </files>
</metalink>
[root@master1 ~]#

12 yum-config-manager

12个yum配置管理器

12.1 切换仓库的启用和禁用状态

不要手动编辑repo文件以切换存储库的启用或禁用状态,而是使用yum-config-manager来切换存储库的启用或禁用状态。

--------------------------------------------------------------------------------------
1. リポジトリ一覧の初期状態を確認する。下記4つのリポジトリが有効になっている
--------------------------------------------------------------------------------------
[root@master1 ~]# yum clean all
[root@master1 ~]# yum repolist
-中略-
リポジトリー ID               リポジトリー名                                           状態
base/7/x86_64                 CentOS-7 - Base                                           9,363
epel/x86_64                   Extra Packages for Enterprise Linux 7 - x86_64           11,049
extras/7/x86_64               CentOS-7 - Extras                                           200
updates/7/x86_64              CentOS-7 - Updates                                          752
repolist: 21,364

--------------------------------------------------------------------------------------
2. リポジトリ(C7.1)を追加する。C7.1リポジトリファイルのenabledが0->1になる。
--------------------------------------------------------------------------------------
[root@master1 ~]# yum-config-manager --enable C7.1*
-以下、略-

リポジトリを表示する。C7.1リポジトリが追加された。
[root@master1 ~]# yum repolist
-中略-
リポジトリー ID                      リポジトリー名                                       状態
!C7.1.1503-base/x86_64               CentOS-7.1.1503 - Base                                8,652
!C7.1.1503-centosplus/x86_64         CentOS-7.1.1503 - CentOSPlus                             73
!C7.1.1503-extras/x86_64             CentOS-7.1.1503 - Extras                                285
!C7.1.1503-fasttrack/x86_64          CentOS-7.1.1503 - CentOSPlus                            110
!C7.1.1503-updates/x86_64            CentOS-7.1.1503 - Updates                             1,726
base/7/x86_64                        CentOS-7 - Base                                       9,363
epel/x86_64                          Extra Packages for Enterprise Linux 7 - x86_64       11,049
extras/7/x86_64                      CentOS-7 - Extras                                       200
updates/7/x86_64                     CentOS-7 - Updates                                      752
repolist: 32,210
[root@master1 ~]#

CentOS-Vault.repoを確認する。C7.1が有効になっていることがわかる。
[root@master1 ~]# less /etc/yum.repos.d/CentOS-Vault.repo
# C7.1.1503
[C7.1.1503-base]
enabled=1
[C7.1.1503-updates]
enabled=1
[C7.1.1503-extras]
enabled=1
[C7.1.1503-centosplus]
enabled=1
[C7.1.1503-fasttrack]
enabled=1


--------------------------------------------------------------------------------------
3. リポジトリ(C7.1)を削除する。C7.1リポジトリファイルのenabledが1->0になる。
--------------------------------------------------------------------------------------
[root@master1 ~]# yum-config-manager --disable C7.1*
-以下、略-
[root@master1 ~]# yum repolist
-中略-
リポジトリー ID             リポジトリー名                                          状態
base/7/x86_64               CentOS-7 - Base                                          9,363
epel/x86_64                 Extra Packages for Enterprise Linux 7 - x86_64          11,049
extras/7/x86_64             CentOS-7 - Extras                                          200
updates/7/x86_64            CentOS-7 - Updates                                         752
repolist: 21,364
[root@master1 ~]#

CentOS-Vault.repoを確認する。C7.1が無効になっていることがわかる。
[root@master1 ~]# less /etc/yum.repos.d/CentOS-Vault.repo
# C7.1.1503
[C7.1.1503-base]
enabled=0
[C7.1.1503-updates]
enabled=0
[C7.1.1503-extras]
enabled=0
[C7.1.1503-centosplus]
enabled=0
[C7.1.1503-fasttrack]
enabled=0

禁用或启用 Nginx 仓库。

-------------------------------
1. nginxリポジトリを有効にする
-------------------------------
リポジトリファイルをインストールする。
[root@master1 ~]# yum install http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
-中略-

[root@master1 ~]# rpm -qa|grep nginx-release
nginx-release-centos-7-0.el7.ngx.noarch

インストールしたリポジトリファイルの中身を確認する。
[root@master1 ~]# cat /etc/yum.repos.d/nginx.repo
# nginx.repo

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1

リポジトリ一覧を表示する。nginxのリポジトリ(★印)が有効になったのがわかる。
[root@master1 ~]# yum clean all
[root@master1 ~]# yum repolist
-中略-
リポジトリー ID         リポジトリー名                                       状態
base/7/x86_64           CentOS-7 - Base                                       9,363
epel/x86_64             Extra Packages for Enterprise Linux 7 - x86_64       11,049
extras/7/x86_64         CentOS-7 - Extras                                       200
nginx/x86_64★          nginx repo                                               41
updates/7/x86_64        CentOS-7 - Updates                                      752
repolist: 21,405

利用可能なパッケージを表示する。
[root@master1 ~]# yum --disablerepo=* --enablerepo=nginx list available
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
利用可能なパッケージ
nginx.x86_64                                   1:1.10.2-1.el7.ngx                              nginx
nginx-debug.x86_64                             1:1.8.0-1.el7.ngx                               nginx
nginx-debuginfo.x86_64                         1:1.10.2-1.el7.ngx                              nginx
nginx-module-geoip.x86_64                      1:1.10.2-1.el7.ngx                              nginx
nginx-module-geoip-debuginfo.x86_64            1:1.10.2-1.el7.ngx                              nginx
nginx-module-image-filter.x86_64               1:1.10.2-1.el7.ngx                              nginx
nginx-module-image-filter-debuginfo.x86_64     1:1.10.2-1.el7.ngx                              nginx
nginx-module-njs.x86_64                        1:1.10.2.0.0.20160414.1c50334fbea6-2.el7.ngx    nginx
nginx-module-njs-debuginfo.x86_64              1:1.10.2.0.0.20160414.1c50334fbea6-2.el7.ngx    nginx
nginx-module-perl.x86_64                       1:1.10.2-1.el7.ngx                              nginx
nginx-module-perl-debuginfo.x86_64             1:1.10.2-1.el7.ngx                              nginx
nginx-module-xslt.x86_64                       1:1.10.2-1.el7.ngx                              nginx
nginx-module-xslt-debuginfo.x86_64             1:1.10.2-1.el7.ngx                              nginx
nginx-nr-agent.noarch                          2.0.0-10.el7.ngx                                nginx
[root@master1 ~]#

nginxの版数一覧を確認する。
[root@master1 ~]# yum --disablerepo=* --enablerepo=nginx --showduplicates list nginx
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
利用可能なパッケージ
nginx.x86_64                                  1:1.8.0-1.el7.ngx                                nginx
nginx.x86_64                                  1:1.8.1-1.el7.ngx                                nginx
nginx.x86_64                                  1:1.10.0-1.el7.ngx                               nginx
nginx.x86_64                                  1:1.10.1-1.el7.ngx                               nginx
nginx.x86_64                                  1:1.10.2-1.el7.ngx                               nginx

nginxはepelリポジトリにもある。
[root@master1 ~]# yum --showduplicates list nginx
-中略-
利用可能なパッケージ
nginx.x86_64                                   1:1.10.2-1.el7                                   epel


--------------------------------------------------------------------
2. nginxリポジトリを無効にする(テスト目的にインストールしただけなので)
--------------------------------------------------------------------

[root@master1 ~]# yum-config-manager --disable nginx

リポジトリファイルの中身を確認する。enabledの値が0(無効)になった。
[root@master1 ~]# cat /etc/yum.repos.d/nginx.repo
# nginx.repo

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=0

有効なリポジトリを表示する。
[root@master1 ~]# yum clean all
[root@master1 ~]# yum repolist
-中略-
リポジトリー ID          リポジトリー名                                     状態
base/7/x86_64            CentOS-7 - Base                                     9,363
epel/x86_64              Extra Packages for Enterprise Linux 7 - x86_64     11,049
extras/7/x86_64          CentOS-7 - Extras                                     200
updates/7/x86_64         CentOS-7 - Updates                                    752
repolist: 21,364
[root@master1 ~]#

14 阿尔卑斯山

Alpine Linux 的软件包管理

コンテナ(alpine)を起動する。
[root@master1 ~]# docker run -it --name alpine alpine sh

リポジトリ一覧を確認する。
/ # cat /etc/apk/repositories
http://dl-cdn.alpinelinux.org/alpine/v3.5/main
http://dl-cdn.alpinelinux.org/alpine/v3.5/community

利用可能なパッケージ一覧を更新する。
/ # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
v3.5.0-50-g72b8702d1f [http://dl-cdn.alpinelinux.org/alpine/v3.5/main]
v3.5.0-48-g8042937a2f [http://dl-cdn.alpinelinux.org/alpine/v3.5/community]
OK: 7955 distinct packages available
/ #

パッケージを検索する。
/ # apk search global
perl-devel-globaldestruction-0.14-r0
perl-symbol-global-name-0.05-r0
perl-symbol-global-name-doc-0.05-r0
perl-devel-globaldestruction-doc-0.14-r0
postfix-3.1.3-r0


限制升级15个软件包的方法(版本锁定)

安装15.1版本的versionlock软件包。

[root@server ~]# yum install yum-plugin-versionlock

禁止15.2更新的方法

インストール済、利用可能なgccパッケージの版数を確認する。
[root@server ~]# yum --showduplicates list gcc
-中略-
インストール済みパッケージ
gcc.x86_64                                       4.8.5-11.el7                                           @anaconda
利用可能なパッケージ
gcc.x86_64                                       4.8.5-16.el7                                           base
gcc.x86_64                                       4.8.5-16.el7_4.1                                       updates

アップデート禁止のパッケージを確認する。現在は何も登録されていないことがわかる。
[root@server ~]# cat /etc/yum/pluginconf.d/versionlock.list
[root@server ~]#

gccパッケージのアップデートを禁止にする。
[root@server ~]# yum versionlock gcc-*
[root@server ~]# cat /etc/yum/pluginconf.d/versionlock.list
# Added locks on Mon Jan 22 20:15:30 2018
0:gcc-gfortran-4.8.5-11.el7.*
0:gcc-4.8.5-11.el7.*
0:gcc-c++-4.8.5-11.el7.*

gccをアップデートする。しかし、アップデートできないことがわかる。
[root@server ~]# yum install gcc
読み込んだプラグイン:fastestmirror, priorities, versionlock
file:///tmp/repo/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /tmp/repo/repodata/repomd.xml"
他のミラーを試します。
Loading mirror speeds from cached hostfile
 * base: ftp.riken.jp
 * epel: ftp.riken.jp
 * extras: ftp.riken.jp
 * ius: iad.mirror.rackspace.com
 * updates: ftp.riken.jp
8 packages excluded due to repository priority protections
何もしません

如何解除禁止15.3升级的方法。

アップデート禁止のパッケージ一覧を確認する。
[root@server ~]# yum versionlock list
読み込んだプラグイン:fastestmirror, priorities, versionlock
0:gcc-gfortran-4.8.5-11.el7.*
0:gcc-4.8.5-11.el7.*
0:gcc-c++-4.8.5-11.el7.*
versionlock list done

アップデート禁止パッケージの設定を解除する。
[root@server ~]# yum versionlock clear
読み込んだプラグイン:fastestmirror, priorities, versionlock
versionlock cleared

アップデート禁止パッケージの一覧を表示する。
[root@server ~]# yum versionlock list
読み込んだプラグイン:fastestmirror, priorities, versionlock
versionlock list done

gccをインストールする。アップデートできることがわかる。
[root@server ~]# yum install gcc
-中略-
=================================================================================================================
 Package                         アーキテクチャー     バージョン                     リポジトリー           容量
=================================================================================================================
更新します:
 gcc                             x86_64               4.8.5-16.el7_4.1               updates                16 M
依存性関連での更新をします:
 cpp                             x86_64               4.8.5-16.el7_4.1               updates               5.9 M
 gcc-c++                         x86_64               4.8.5-16.el7_4.1               updates               7.2 M
 gcc-gfortran                    x86_64               4.8.5-16.el7_4.1               updates               6.6 M
 libgcc                          x86_64               4.8.5-16.el7_4.1               updates                98 k
 libgfortran                     x86_64               4.8.5-16.el7_4.1               updates               296 k
 libgomp                         x86_64               4.8.5-16.el7_4.1               updates               154 k
 libquadmath                     x86_64               4.8.5-16.el7_4.1               updates               186 k
 libquadmath-devel               x86_64               4.8.5-16.el7_4.1               updates                49 k
 libstdc++                       x86_64               4.8.5-16.el7_4.1               updates               301 k
 libstdc++-devel                 x86_64               4.8.5-16.el7_4.1               updates               1.5 M

トランザクションの要約
=================================================================================================================
更新  1 パッケージ (+10 個の依存関係のパッケージ)

総ダウンロード容量: 38 M
Is this ok [y/d/N]:

请参考以下资料

理研的存储库
镜像列表的状态

RHEL6手册
将排除的更新对象移除
软件包管理|什么是yum
通过更改yum引用的镜像站点的baseurl来设置日本境内的站点

bannerAds