{"id":25980,"date":"2024-01-23T15:47:25","date_gmt":"2023-07-03T02:02:41","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/"},"modified":"2025-08-11T17:47:49","modified_gmt":"2025-08-11T09:47:49","slug":"%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/","title":{"rendered":"\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;)"},"content":{"rendered":"<h1>\u9996\u5148\u3002<\/p>\n<p>\u5728\u8fdb\u884c\u672c\u6b21\u9a8c\u8bc1\u65f6\uff0c\u6211\u4eec\u5220\u9664\u4e86 CentOS-Media.repo \u6587\u4ef6\uff0c\u56e0\u4e3a\u5b83\u4f1a\u5bfc\u81f4\u5728\u6267\u884c yum &#8211;enablerepo=* \u547d\u4ee4\u65f6\uff0c\u64cd\u4f5c\u4f1a\u5931\u8d25\uff0c\u8fd9\u4e2a\u547d\u4ee4\u662f\u4ee5\u6240\u6709\u4ed3\u5e93\u4e3a\u76ee\u6807\u8fdb\u884c\u64cd\u4f5c\u7684\u3002<\/p>\n<pre class=\"post-pre\"><code>[root@master1 yum.repos.d]# pwd\r\n\/etc\/yum.repos.d\r\n[root@master1 yum.repos.d]# ls CentOS-Media.repo\r\nCentOS-Media.repo\r\n\r\n[root@master1 yum.repos.d]# rm CentOS-Media.repo\r\nrm: \u901a\u5e38\u30d5\u30a1\u30a4\u30eb `CentOS-Media.repo' \u3092\u524a\u9664\u3057\u307e\u3059\u304b? y\r\n\r\n[root@master1 yum.repos.d]# ls CentOS-Media.repo\r\nls: CentOS-Media.repo \u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093: \u305d\u306e\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u3042\u308a\u307e\u305b\u3093\r\n[root@master1 yum.repos.d]#\r\n\r\n<\/code><\/pre>\n<h1>1. \u9a8c\u8bc1\u73af\u5883<\/p>\n<pre class=\"post-pre\"><code>[root@master1 ~]# cat \/etc\/redhat-release\r\nCentOS Linux release 7.2.1511 (Core)\r\n\r\n[root@master1 ~]# rpm -qa|grep centos-release\r\ncentos-release-7-2.1511.el7.centos.2.10.x86_64\r\n\r\n<\/code><\/pre>\n<h1>\u9009\u62e9\u65e5\u672c\u56fd\u5185\u7684\u5b58\u50a8\u5e93\uff08\u5305\u62ec_only=.jp\uff09\u3002<\/p>\n<p>\u5728\u4ec5\u542f\u7528include_only\u7684\u60c5\u51b5\u4e0b\u548c\u7981\u7528jp\u7684\u60c5\u51b5\u4e0b\uff0c\u5bf9\u6bd4\u8bbf\u95ee\u7684\u57df\u540d\u3002\u5f53\u4ec5\u542f\u7528jp\u65f6\uff0c\u53d1\u73b0\u53ea\u80fd\u8bbf\u95eejp\u57df\u540d\u3002<\/p>\n<pre class=\"post-pre\"><code>-------------------------------------------\r\n1. jp\u3060\u3051\u3092\u6709\u52b9\u306b\u3059\u308b\u3002\r\n-------------------------------------------\r\n[root@master1 ~]# vi \/etc\/yum\/pluginconf.d\/fastestmirror.conf\r\n#include_only=.nl,.de,.uk,.ie\r\ninclude_only=.jp\r\n\r\nyum\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30af\u30ea\u30a2\u3059\u308b\u3002\r\n[root@master1 ~]# yum clean all\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u3092\u6e05\u6383\u3057\u3066\u3044\u307e\u3059: base epel extras updates\r\nCleaning up everything\r\nCleaning up list of fastest mirrors\r\n\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8868\u793a\u3059\u308b\u3002\r\n[root@master1 ~]# yum repolist\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror\r\nbase                                                               | 3.6 kB  00:00:00\r\nepel\/x86_64\/metalink                                               | 4.6 kB  00:00:00\r\nepel                                                               | 4.3 kB  00:00:00\r\nextras                                                             | 3.4 kB  00:00:00\r\nupdates                                                            | 3.4 kB  00:00:00\r\n(1\/7): epel\/x86_64\/group_gz                                        | 170 kB  00:00:09\r\n(2\/7): base\/7\/x86_64\/primary_db                                    | 5.6 MB  00:00:12\r\n(3\/7): extras\/7\/x86_64\/primary_db                                  | 183 kB  00:00:02\r\n(4\/7): epel\/x86_64\/updateinfo                                      | 706 kB  00:00:14\r\n(5\/7): updates\/7\/x86_64\/primary_db                                 | 1.3 MB  00:00:03\r\n(6\/7): base\/7\/x86_64\/group_gz                                      | 155 kB  00:00:16\r\n(7\/7): epel\/x86_64\/primary_db                                      | 4.5 MB  00:12:25\r\nDetermining fastest mirrors\r\nIncluding mirror: ftp.riken.jp\r\nIncluding mirror: ftp.tsukuba.wide.ad.jp\r\nIncluding mirror: ftp.iij.ad.jp\r\nIncluding mirror: www.ftp.ne.jp\r\nIncluding mirror: ftp.jaist.ac.jp\r\nIncluding mirror: ftp.yz.yamagata-u.ac.jp\r\nIncluding mirror: mirror.fairway.ne.jp\r\n * base: ftp.riken.jp\r\nIncluding mirror: ftp.riken.jp\r\nIncluding mirror: ftp.jaist.ac.jp\r\n * epel: ftp.riken.jp\r\nIncluding mirror: ftp.riken.jp\r\nIncluding mirror: ftp.tsukuba.wide.ad.jp\r\nIncluding mirror: ftp.iij.ad.jp\r\nIncluding mirror: www.ftp.ne.jp\r\nIncluding mirror: ftp.jaist.ac.jp\r\nIncluding mirror: ftp.yz.yamagata-u.ac.jp\r\nIncluding mirror: mirror.fairway.ne.jp\r\n * extras: ftp.riken.jp\r\nIncluding mirror: ftp.riken.jp\r\nIncluding mirror: ftp.tsukuba.wide.ad.jp\r\nIncluding mirror: ftp.iij.ad.jp\r\nIncluding mirror: www.ftp.ne.jp\r\nIncluding mirror: ftp.jaist.ac.jp\r\nIncluding mirror: ftp.yz.yamagata-u.ac.jp\r\nIncluding mirror: mirror.fairway.ne.jp\r\n * updates: ftp.riken.jp\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc ID                         \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u540d                                                  \u72b6\u614b\r\nbase\/7\/x86_64                           CentOS-7 - Base                                               9,363\r\nepel\/x86_64                             Extra Packages for Enterprise Linux 7 - x86_64               11,019\r\nextras\/7\/x86_64                         CentOS-7 - Extras                                               435\r\nupdates\/7\/x86_64                        CentOS-7 - Updates                                              433\r\nrepolist: 21,250\r\n[root@master1 yum.repos.d]#\r\n\r\n\r\n-------------------------------------------\r\n2. jp\u3092\u7121\u52b9\u306b\u3059\u308b\u3002\r\n-------------------------------------------\r\n[root@master1 ~]# vi \/etc\/yum\/pluginconf.d\/fastestmirror.conf\r\ninclude_only=.nl,.de,.uk,.ie\r\n\r\njp\u30c9\u30e1\u30a4\u30f3\u4ee5\u5916\u306b\u3082\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3002\r\n[root@master1 ~]# yum repolist\r\n-\u4e2d\u7565-\r\nDetermining fastest mirrors\r\nIncluding mirror: ftp.tsukuba.wide.ad.jp\r\nIncluding mirror: mirror.vodien.com\r\n * base: ftp.tsukuba.wide.ad.jp\r\n * epel: ftp.jaist.ac.jp\r\nIncluding mirror: ftp.tsukuba.wide.ad.jp\r\nIncluding mirror: mirror.vodien.com\r\nIncluding mirror: download.nus.edu.sg\r\n * extras: ftp.tsukuba.wide.ad.jp\r\nIncluding mirror: ftp.tsukuba.wide.ad.jp\r\nIncluding mirror: download.nus.edu.sg\r\n * updates: ftp.tsukuba.wide.ad.jp\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc ID                    \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u540d                                                    \u72b6\u614b\r\nbase\/7\/x86_64                     CentOS-7 - Base                                                  9,363\r\nepel\/x86_64                       Extra Packages for Enterprise Linux 7 - x86_64                  11,042\r\nextras\/7\/x86_64                   CentOS-7 - Extras                                                  200\r\nupdates\/7\/x86_64                  CentOS-7 - Updates                                                 438\r\nrepolist: 21,043\r\n[root@master1 ~]#\r\n\r\n\r\n<\/code><\/pre>\n<h1>\u67e5\u8be2\u53ef\u7528\u7684\u5b58\u50a8\u5e93\uff08repolist\uff0crepolist all\uff09<\/p>\n<pre class=\"post-pre\"><code>\r\n\u672c\u30b7\u30b9\u30c6\u30e0(master1)\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u30ea\u30dd\u30b8\u30c8\u30ea\u30d5\u30a1\u30a4\u30eb(*.repo)\u3092\u3082\u3068\u306b\u3001\u6709\u52b9\u306a\u30ea\u30dd\u30b8\u30c8\u30ea\u3060\u3051\u3092\u8868\u793a\u3059\u308b\u3002\r\n\u3064\u307e\u308a\u3001enabled=1\u3068\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u30ea\u30dd\u30b8\u30c8\u30ea\u3060\u3051\u304c\u8868\u793a\u3055\u308c\u308b\u3002\r\n[root@master1 ~]# yum repolist\r\n-\u4e2d\u7565-\r\n\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc ID                                     \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u540d                                                                  \u72b6\u614b\r\nbase\/7\/x86_64                                       CentOS-7 - Base                                                                  9,363\r\nepel\/x86_64                                         Extra Packages for Enterprise Linux 7 - x86_64                                  11,019\r\nextras\/7\/x86_64                                     CentOS-7 - Extras                                                                  435\r\nupdates\/7\/x86_64                                    CentOS-7 - Updates                                                                 433\r\nrepolist: 21,250\r\n[root@master1 ~]#\r\n\r\n\r\n\u672c\u30b7\u30b9\u30c6\u30e0(master1)\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u30ea\u30dd\u30b8\u30c8\u30ea\u30d5\u30a1\u30a4\u30eb(*.repo)\u3092\u3082\u3068\u306b\u3001\u5168\u3066\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8868\u793a\u3059\u308b\u3002\r\n\u3064\u307e\u308a\u3001enabled=0\u3068\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u30ea\u30dd\u30b8\u30c8\u30ea\u3082\u8868\u793a\u3055\u308c\u308b\u3002\r\n[root@master1 ~]# yum repolist all\r\n-\u4e2d\u7565-\r\n\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc ID                    \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u540d                                                         \u72b6\u614b\r\n!C7.0.1406-base\/x86_64             CentOS-7.0.1406 - Base                                                 \u7121\u52b9\r\n!C7.0.1406-centosplus\/x86_64       CentOS-7.0.1406 - CentOSPlus                                           \u7121\u52b9\r\n!C7.0.1406-extras\/x86_64           CentOS-7.0.1406 - Extras                                               \u7121\u52b9\r\n!C7.0.1406-fasttrack\/x86_64        CentOS-7.0.1406 - CentOSPlus                                           \u7121\u52b9\r\n!C7.0.1406-updates\/x86_64          CentOS-7.0.1406 - Updates                                              \u7121\u52b9\r\n!C7.1.1503-base\/x86_64             CentOS-7.1.1503 - Base                                                 \u7121\u52b9\r\n!C7.1.1503-centosplus\/x86_64       CentOS-7.1.1503 - CentOSPlus                                           \u7121\u52b9\r\n!C7.1.1503-extras\/x86_64           CentOS-7.1.1503 - Extras                                               \u7121\u52b9\r\n!C7.1.1503-fasttrack\/x86_64        CentOS-7.1.1503 - CentOSPlus                                           \u7121\u52b9\r\n!C7.1.1503-updates\/x86_64          CentOS-7.1.1503 - Updates                                              \u7121\u52b9\r\nbase\/7\/x86_64                      CentOS-7 - Base                                                        \u6709\u52b9:  9,363\r\n!base-debuginfo\/x86_64             CentOS-7 - Debuginfo                                                   \u7121\u52b9\r\n!base-source\/7                     CentOS-7 - Base Sources                                                \u7121\u52b9\r\nc7-media                           CentOS-7 - Media                                                       \u7121\u52b9\r\ncentosplus\/7\/x86_64                CentOS-7 - Plus                                                        \u7121\u52b9\r\ncentosplus-source\/7                CentOS-7 - Plus Sources                                                \u7121\u52b9\r\ncr\/7\/x86_64                        CentOS-7 - cr                                                          \u7121\u52b9\r\nepel\/x86_64                        Extra Packages for Enterprise Linux 7 - x86_64                         \u6709\u52b9: 11,019\r\nepel-debuginfo\/x86_64              Extra Packages for Enterprise Linux 7 - x86_64 - Debug                 \u7121\u52b9\r\nepel-source\/x86_64                 Extra Packages for Enterprise Linux 7 - x86_64 - Source                \u7121\u52b9\r\nepel-testing\/x86_64                Extra Packages for Enterprise Linux 7 - Testing - x86_64               \u7121\u52b9\r\nepel-testing-debuginfo\/x86_64      Extra Packages for Enterprise Linux 7 - Testing - x86_64 - Debug       \u7121\u52b9\r\nepel-testing-source\/x86_64         Extra Packages for Enterprise Linux 7 - Testing - x86_64 - Source      \u7121\u52b9\r\nextras\/7\/x86_64                    CentOS-7 - Extras                                                      \u6709\u52b9:    435\r\n!extras-source\/7                   CentOS-7 - Extras Sources                                              \u7121\u52b9\r\nfasttrack\/7\/x86_64                 CentOS-7 - fasttrack                                                   \u7121\u52b9\r\nupdates\/7\/x86_64                   CentOS-7 - Updates                                                     \u6709\u52b9:    433\r\nupdates-source\/7                   CentOS-7 - Updates Sources                                             \u7121\u52b9\r\nrepolist: 21,250\r\n[root@master1 ~]#\r\n\r\n<\/code><\/pre>\n<h1>\u67e5\u770b\u4ee3\u7801\u5e93\u7684\u65b9\u6cd5<\/p>\n<h2>4.1 \u67e5\u627e\u547d\u4ee4\u63d0\u4f9b\u6e90\u4ee3\u7801\u5e93\u7684\u65b9\u6cd5(whatprovides)<\/p>\n<pre class=\"post-pre\"><code>\r\n[root@master1 ~]# which chronyd\r\n\/usr\/sbin\/chronyd\r\n\r\nchronyd\u30b3\u30de\u30f3\u30c9\u306e\u63d0\u4f9b\u5143\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8abf\u3079\u308b\u3002\r\nbase,updates\u306e2\u3064\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3002\r\n[root@master1 ~]# yum whatprovides \/usr\/sbin\/chronyd\r\n-\u4e2d\u7565-\r\n\r\nchrony-2.1.1-3.el7.centos.x86_64 : An NTP client\/server\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc        : base\r\n\u4e00\u81f4          :\r\n\u30d5\u30a1\u30a4\u30eb\u540d    : \/usr\/sbin\/chronyd\r\n\r\nchrony-2.1.1-4.el7.centos.x86_64 : An NTP client\/server\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc        : updates\r\n\u4e00\u81f4          :\r\n\u30d5\u30a1\u30a4\u30eb\u540d    : \/usr\/sbin\/chronyd\r\n\r\nchrony-2.1.1-4.el7.centos.x86_64 : An NTP client\/server\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc        : @updates\r\n\u4e00\u81f4          :\r\n\u30d5\u30a1\u30a4\u30eb\u540d    : \/usr\/sbin\/chronyd\r\n\r\n\r\n<\/code><\/pre>\n<h1>\u5728\u5b58\u50a8\u5e93\u4e2d\u641c\u7d22\u5305\u7684\u65b9\u6cd5\u3002<\/p>\n<p>\u786e\u8ba4\u5404\u4e2a\u4ed3\u5e93\uff08C7.0\uff0cC7.1\u7b49\uff09\u4e2d\u5b58\u5728\u54ea\u4e9b\u7248\u672c\u7684\u8f6f\u4ef6\u5305\u3002<\/p>\n<pre class=\"post-pre\"><code>-----------------------------------------------------------\r\n1. \u4e8b\u524d\u6e96\u5099(\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5b58\u5728\u3059\u308bbash\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u78ba\u8a8d\u3059\u308b\uff09\r\n-----------------------------------------------------------\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bbash\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u7248\u6570\u3092\u8abf\u3079\u308b\u3002\r\n[root@master1 yum.repos.d]# rpm -qa|grep bash\r\nbash-4.2.46-19.el7.x86_64\r\n\r\nyum\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30af\u30ea\u30a2\u3059\u308b\u3002\r\n[root@master1 ~]# yum clean all\r\n-\u4ee5\u4e0b\u3001\u7565-\r\n\r\n\u5229\u7528\u53ef\u80fd\u306a\u5168\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u3042\u308bbash\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u7248\u6570\u4e00\u89a7\u3092\u8abf\u3079\u308b\u3002\r\nbase,updates\u306fCentOS7.3\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u793a\u3057\u3066\u3044\u308b\uff08\u2605\u5370)\u3002CentOS7.2\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u3042\u308bbash\u306f\u8868\u793a\u3055\u308c\u306a\u3044\u6a21\u69d8\u3002\r\n[root@master1 yum.repos.d]# yum --enablerepo=* --showduplicates list bash\r\n-\u4e2d\u7565-\r\n\r\n\u5229\u7528\u53ef\u80fd\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\r\nbash.x86_64               4.2.45-5.el7                     C7.0.1406-base\r\nbash.x86_64               4.2.45-5.el7_0.2                 C7.0.1406-updates\r\nbash.x86_64               4.2.45-5.el7_0.4                 C7.0.1406-updates\r\nbash.x86_64               4.2.46-12.el7                    C7.1.1503-base\r\nbash.x86_64               4.2.46-20.el7_2                  base  \u2605\r\nbash.x86_64               4.2.46-21.el7_3                  updates \u2605\r\n\r\n-----------------------------------------------------------------\r\n3. CentOS7.0(C7.0)\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5b58\u5728\u3059\u308bbash\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u3002\r\n-----------------------------------------------------------------\r\n[root@master1 yum.repos.d]# yum --disablerepo=* --enablerepo=C7.0* --showduplicates list bash\r\n-\u4e2d\u7565-\r\n\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u30d1\u30c3\u30b1\u30fc\u30b8\r\nbash.x86_64               4.2.46-19.el7                     @anaconda\r\n\u5229\u7528\u53ef\u80fd\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\r\nbash.x86_64               4.2.45-5.el7                      C7.0.1406-base\r\nbash.x86_64               4.2.45-5.el7_0.2                  C7.0.1406-updates\r\nbash.x86_64               4.2.45-5.el7_0.4                  C7.0.1406-updates\r\n\r\n-----------------------------------------------------------------\r\n4. CentOS7.1(C7.1)\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5b58\u5728\u3059\u308bbash\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u3002\r\n-----------------------------------------------------------------\r\n[root@master1 yum.repos.d]# yum --disablerepo=* --enablerepo=C7.1* --showduplicates list bash\r\n-\u4e2d\u7565-\r\n\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u30d1\u30c3\u30b1\u30fc\u30b8\r\nbash.x86_64                4.2.46-19.el7                   @anaconda\r\n\u5229\u7528\u53ef\u80fd\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\r\nbash.x86_64                4.2.46-12.el7                   C7.1.1503-base\r\n\r\n--------------------------------------------------------\r\n5. \u6700\u65b0\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5b58\u5728\u3059\u308bbash\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u3002\r\n--------------------------------------------------------\r\n\u672c\u691c\u8a3c\u6642\u70b9\u306e\u6700\u65b0\u30ea\u30dd\u30b8\u30c8\u30ea\u306fCentOS7.3\u306b\u306a\u308a\u307e\u3059\u3002\r\n[root@master1 yum.repos.d]# yum check-update centos-release\r\n-\u4e2d\u7565-\r\ncentos-release.x86_64       7-3.1611.el7.centos           base\r\n\r\n\u6700\u65b0\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5b58\u5728\u3059\u308bbash\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u3002\r\nbase,updates\u306f\u3001CentOS7.2\u3067\u306f\u306a\u304f\u3001CentOS7.3\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8868\u3059\u3053\u3068\u306b\u306a\u308a\u307e\u3059\uff08\u2605\u5370)\r\n[root@master1 yum.repos.d]# yum --disablerepo=* --enablerepo=base,updates --showduplicates list bash\r\n-\u4e2d\u7565-\r\n\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u30d1\u30c3\u30b1\u30fc\u30b8\r\nbash.x86_64                  4.2.46-19.el7             @anaconda\r\n\u5229\u7528\u53ef\u80fd\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\r\nbash.x86_64                  4.2.46-20.el7_2           base \u2605\r\nbash.x86_64                  4.2.46-21.el7_3           updates \u2605\r\n[root@master1 yum.repos.d]#\r\n\r\n<\/code><\/pre>\n<h1>\u5c06\u7279\u5b9a\u7684\u8f6f\u4ef6\u5305\u4eceyum\u66f4\u65b0\u7684\u76ee\u6807\u5217\u8868\u4e2d\u6392\u9664\u3002<\/p>\n<p>\u901a\u8fc7\u5c06\/etc\/yum.conf\u4e2d\u7684exclude=<\u5305\u540d\u79f0>\u8fdb\u884c\u8bbe\u7f6e\uff0c\u53ef\u4ee5\u5c06\u5176\u6392\u9664\u5728yum update\u7684\u8303\u56f4\u4e4b\u5916\u3002<br \/>\n\u4ee5\u4e0b\u662f\u5c06kubernetes-master\u5305\u6392\u9664\u5728\u66f4\u65b0\u8303\u56f4\u4e4b\u5916\u7684\u793a\u4f8b\u3002<\/p>\n<pre class=\"post-pre\"><code>kubernetes-master\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u7248\u6570\u3092\u8abf\u3079\u308b\u3002\r\n[root@master1 yum.repos.d]# rpm -qa|grep kubernetes-master\r\nkubernetes-master-1.2.0-0.13.gitec7364b.el7.x86_64\r\n\r\nyum\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30af\u30ea\u30a2\u3059\u308b\u3002\r\n[root@master1 yum.repos.d]# yum clean all\r\n-\u4ee5\u4e0b\u3001\u7565-\r\n\r\n\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u53ef\u80fd\u304b\u3069\u3046\u304b\u8abf\u3079\u308b\u3002\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u53ef\u80fd\u3060\u3068\u308f\u304b\u308b\u3002\r\n[root@master1 yum.repos.d]# yum check-update kubernetes-master\r\n-\u4e2d\u7565-\r\nkubernetes-master.x86_64                    1.3.0-0.3.git86dc49a.el7             extras\r\n[root@master1 yum.repos.d]#\r\n\r\nkubernetes\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u7981\u6b62\u306b\u3059\u308b\u3002\r\n[root@master1 yum.repos.d]# vi \/etc\/yum.conf\r\nexclude=kubernetes-master\r\n\r\n[root@master1 yum.repos.d]# yum clean all\r\n-\u4ee5\u4e0b\u3001\u7565-\r\n\r\n\r\n\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u53ef\u80fd\u304b\u3069\u3046\u304b\u8abf\u3079\u308b\u3002\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u53ef\u80fd\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306a\u3057\u3002\r\nexclude\u304c\u6a5f\u80fd\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u3002\r\n[root@master1 yum.repos.d]# yum check-update kubernetes-master\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror\r\n-\u4e2d\u7565-\r\n\r\n[root@master1 yum.repos.d]#\r\n\r\n<\/code><\/pre>\n<h1>\u4e0b\u8f7d\u4e8c\u8fdb\u5236\u8f6f\u4ef6\u5305\u548c\u6e90\u4ee3\u7801\u8f6f\u4ef6\u5305\u3002<\/p>\n<pre class=\"post-pre\"><code>---------------\r\n1. \u4e8b\u524d\u6e96\u5099\r\n---------------\r\nyumdownloader\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3046\u306e\u3067\u3001\u4e8b\u524d\u6e96\u5099\u3068\u3057\u3066 yum-utils\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002\r\n[root@master1 ~]# yum -y install yum-utils\r\n-\u4ee5\u4e0b\u3001\u7565-\r\n\r\n---------------------------------------\r\n2. \u30d0\u30a4\u30ca\u30ea\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\r\n---------------------------------------\r\n[root@master1 ~]# yumdownloader bc\r\n-\u4e2d\u7565-\r\nbc-1.06.95-13.el7.x86_64.rpm                                                 | 115 kB  00:00:00\r\n\r\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u78ba\u8a8d\u3059\u308b\u3002\u30d0\u30a4\u30ca\u30ea\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u305f\u3002\r\n[root@master1 ~]# ls\r\nbc-1.06.95-13.el7.x86_64.rpm\r\n\r\n---------------------------------------\r\n3. \u30bd\u30fc\u30b9\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\r\n---------------------------------------\r\n[root@master1 ~]# yumdownloader --source bc\r\n-\u4e2d\u7565-\r\nbc-1.06.95-13.el7.src.rpm                              \u3000\u3000\u3000\u3000\u3000\u3000      | 301 kB  00:00:04\r\n\r\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u78ba\u8a8d\u3059\u308b\u3002\u30bd\u30fc\u30b9\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u305f\u3002\r\n[root@master1 ~]# ls\r\nbc-1.06.95-13.el7.src.rpm\r\n\r\n<\/code><\/pre>\n<h1>\u5728\u6267\u884c8 yum\u547d\u4ee4\u65f6\u53d1\u9001\u548c\u63a5\u6536\u7684\u6570\u636e\u5305<\/p>\n<p>\u5f53\u6211\u6267\u884cyum\u547d\u4ee4\u65f6\uff0c\u6211\u67e5\u770b\u4e86\u6d41\u52a8\u7684\u6570\u636e\u5305\u3002\u5728\u5efa\u7acbTCP\u8fde\u63a5\u540e\uff0c\u4f7f\u7528HTTP GET\u65b9\u6cd5\u4e0b\u8f7d\u6587\u4ef6\u3002\u5f53\u6587\u4ef6\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u4ece\u4ed3\u5e93\u8fd4\u56de\u4e86HTTP OK\u3002\u7136\u540e\u65ad\u5f00\u4e86TCP\u8fde\u63a5\u3002<\/p>\n<pre class=\"post-pre\"><code>\u30d1\u30b1\u30c3\u30c8\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3059\u308b\u3002\r\n[root@master1 ~]# tcpdump -i eth0 tcp port 80 -w yum.cap\r\n\r\nbc\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3002\r\n[root@master1 ~]# yumdownloader --source bc\r\n\r\nTCP\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u3092\u78ba\u7acb\u3057\u305f\u3042\u3068\u3001HTTTP GET\u3092\u3057\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3044\u308b\u3002\r\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089HTTP\/1.1 200 OK \u304c\u8fd4\u3063\u3066\u304d\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3002\r\n\u305d\u306e\u3042\u3068\u3001TCP\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u3092\u7d42\u4e86\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3002\r\n\r\n  master1                                                                        \u30ea\u30dd\u30b8\u30c8\u30ea\r\n  192.168.0.10                                                                 108.61.16.227\r\n   |                                                                                   |\r\n   |-------------------------- SYN ---------------------------------------------------&gt;|\r\n   |&lt;------------------------- SYN + ACK ----------------------------------------------|\r\n   |-------------------------- ACK ---------------------------------------------------&gt;|\r\n   |                                                                                   |\r\n   |--- HTTP GET \/centos\/7\/os\/Source\/SPackages\/bc-1.06.95-13.el7.src.rpm HTTP\/1.1) ---&gt;|\r\n   |                                                                                   |\r\n   |                                                                                   |\r\n   |&lt;------------------------- DATA ---------------------------------------------------|\r\n   |-------------------------- ACK ---------------------------------------------------&gt;|\r\n   |                            :                                                      |\r\n   |                         repeat                                                    |\r\n   |                            :                                                      |\r\n   |                                                                                   |\r\n   |&lt;-------------------- HTTP\/1.1 200 OK  (application\/x-rpm) + FIN ------------------|\r\n   |-------------------------- ACK ---------------------------------------------------&gt;|\r\n   |-------------------------- FIN ---------------------------------------------------&gt;|\r\n   |&lt;------------------------- ACK ----------------------------------------------------|\r\n   |                                                                                   |\r\n\r\n<\/code><\/pre>\n<h1>\u67e5\u770b9\u4e2ayum\u547d\u4ee4\u7684\u6267\u884c\u5386\u53f2\u548c\u6267\u884c\u5185\u5bb9\u3002<\/p>\n<pre class=\"post-pre\"><code>--------------------------------------\r\n1. \/var\/log\/yum.log\u3092\u78ba\u8a8d\u3059\u308b\u65b9\u6cd5\r\n--------------------------------------\r\n[root@master1 ~]# cat \/var\/log\/yum.log\r\nJan 04 21:36:50 Erased: flannel-0.5.5-1.el7.x86_64\r\nJan 10 20:47:50 Installed: flannel-0.2.0-10.el7.x86_64\r\nJan 10 20:48:30 Erased: flannel-0.2.0-10.el7.x86_64\r\nJan 10 20:48:42 Installed: flannel-0.2.0-10.el7.x86_64\r\nJan 10 20:49:27 Erased: flannel-0.2.0-10.el7.x86_64\r\nJan 10 21:16:32 Installed: flannel-0.2.0-10.el7.x86_64\r\nJan 10 21:21:34 Erased: flannel-0.2.0-10.el7.x86_64\r\nJan 10 22:06:08 Installed: flannel-0.2.0-10.el7.x86_64\r\n\r\n--------------------------------------\r\n2. yum history\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3046\u65b9\u6cd5\r\n--------------------------------------\r\n[root@master1 ~]# yum history list\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror\r\nID     | \u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3           | \u65e5\u6642             | \u64cd\u4f5c           | \u5909\u66f4\r\n-------------------------------------------------------------------------------\r\n    66 | --disablerepo=* --enable | 2017-01-18 17:46 | Downgrade      |    1\r\n    65 | install centos-release   | 2017-01-18 17:42 | Update         |    1\r\n    64 | --disablerepo=* --enable | 2017-01-18 17:16 | Downgrade      |    1\r\n    63 | install centos-release   | 2017-01-18 17:15 | Update         |    1\r\n\r\n-\u4ee5\u4e0b\u3001\u7565-\r\n\r\n------------------------------------------------------\r\n3. yum history\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3046\u65b9\u6cd5(\u8a73\u7d30\u60c5\u5831\u3092\u8868\u793a\u3059\u308b)\r\n------------------------------------------------------\r\nID=66\u306e\u8a73\u7d30\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\u3002\r\n[root@master1 ~]# yum history info 66\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror\r\n\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3 ID : 66\r\n\u958b\u59cb\u6642\u9593            : Wed Jan 18 17:46:38 2017\r\n\u958b\u59cb rpmdb          : 455:4dfd34f42517660c2ceb1f96b0d5add3ba57fcf7\r\n\u7d42\u4e86\u6642\u9593            :            17:46:39 2017 (1 \u79d2)\r\n\u7d42\u4e86 rpmdb          : 455:251e9bfe6addcc6d45ac52c94a5c37ea0776552d\r\n\u30e6\u30fc\u30b6\u30fc            : root &lt;root&gt;\r\n\u7d42\u4e86\u30b3\u30fc\u30c9          : \u6210\u529f\r\n\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3      : --disablerepo=* --enablerepo=C7.2.1511* downgrade centos-release\r\n\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u5b9f\u884c:\r\n    \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb rpm-4.11.3-17.el7.x86_64                      @anaconda\r\n    \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb yum-3.4.3-150.el7.centos.noarch               @base\r\n    \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb yum-plugin-fastestmirror-1.1.31-34.el7.noarch @anaconda\r\n\u5207\u308a\u66ff\u3048\u305f\u30d1\u30c3\u30b1\u30fc\u30b8:\r\n    \u30c0\u30a6\u30f3\u30b0\u30ec\u30fc\u30c9 centos-release-7-2.1511.el7.centos.2.10.x86_64 @C7.2.1511-base\r\n    \u30c0\u30a6\u30f3\u30b0\u30ec\u30fc\u30c9\u6e08\u307f                7-3.1611.el7.centos.x86_64      @base\r\nhistory info\r\n[root@master1 ~]#\r\n\r\n\r\n--------------------------------------------------\r\n4. yum history\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3046\u65b9\u6cd5(\u7279\u5b9a\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u307f)\r\n--------------------------------------------------\r\n[root@master1 yum.repos.d]# yum history list flannel\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror\r\nID     | \u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3           | \u65e5\u6642             | \u64cd\u4f5c           | \u5909\u66f4\r\n-------------------------------------------------------------------------------\r\n    47 | -y install flannel-0.2.0 | 2017-01-10 22:06 | Install        |    1\r\n    46 | -y remove flannel        | 2017-01-10 21:21 | Erase          |    1\r\n    45 | -y install flannel-0.2.0 | 2017-01-10 21:16 | Install        |    1\r\n    44 | -y remove flannel        | 2017-01-10 20:49 | Erase          |    1\r\n-\u4ee5\u4e0b\u3001\u7565-\r\n\r\n<\/code><\/pre>\n<h1>\u964d\u4f4e10 rpm\u8f6f\u4ef6\u5305\u7684\u7248\u672c<\/p>\n<pre class=\"post-pre\"><code>\u8aa4\u3063\u3066\u3001CentOS7.2\u306bCentOS7.3\u7528\u306ecentos-release\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3057\u307e\u3063\u305f\u3002\r\n[root@master1 yum.repos.d]# rpm -qa|grep centos-release\r\ncentos-release-7-3.1611.el7.centos.x86_64\r\n[root@master1 yum.repos.d]#\r\n\r\nrpm\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30b0\u30ec\u30fc\u30c9\u3092\u3059\u308b\u3002\r\n\u3057\u304b\u3057\u3001\u73fe\u6642\u70b9\u3067\u306fCentOS7.3\u304c\u6700\u65b0\u30ea\u30dd\u30b8\u30c8\u30ea\u306a\u306e\u3067\u3001\u30c0\u30a6\u30f3\u30b0\u30ec\u30fc\u30c9\u3067\u304d\u306a\u3044\u3002\r\n[root@master1 yum.repos.d]# yum downgrade centos-release\r\n-\u4e2d\u7565-\r\n\u4f55\u3082\u3057\u307e\u305b\u3093\r\n[root@master1 yum.repos.d]#\r\n\r\n\u5168\u30ea\u30dd\u30b8\u30c8\u30ea(7.0\u304b\u30897.2)\u306ecentos-release\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u7248\u6570\u3092\u8868\u793a\u3059\u308b\u3002enablerepo\u306b\"c7*\"\u3068\u6307\u5b9a\u3059\u308b\u3002\r\n[root@master1 yum.repos.d]# yum --disablerepo=* --enablerepo=C7* --showduplicates list  centos-release\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror\r\nLoading mirror speeds from cached hostfile\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u30d1\u30c3\u30b1\u30fc\u30b8\r\ncentos-release.x86_64              7-3.1611.el7.centos                   @base\r\n\u5229\u7528\u53ef\u80fd\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\r\ncentos-release.x86_64              7-0.1406.el7.centos.2.3               C7.0.1406-base\r\ncentos-release.x86_64              7-0.1406.el7.centos.2.4               C7.0.1406-updates\r\ncentos-release.x86_64              7-0.1406.el7.centos.2.5               C7.0.1406-updates\r\ncentos-release.x86_64              7-0.1406.el7.centos.2.6               C7.0.1406-updates\r\ncentos-release.x86_64              7-1.1503.el7.centos.2.8               C7.1.1503-base\r\ncentos-release.x86_64              7-1.1503.el7.centos.2.8               C7.1.1503-updates\r\ncentos-release.x86_64              7-2.1511.el7.centos.2.10              C7.2.1511-base\r\n[root@master1 yum.repos.d]#\r\n\r\n\r\nCentOS7.2\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u3042\u308bcentos-release\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u30c0\u30a6\u30f3\u30b0\u30ec\u30fc\u30c9\u3059\u308b\u3002\r\nenablerepo\u306b\"C7.2.1511*\"\u3068\u6307\u5b9a\u3059\u308b\u3002\r\n[root@master1 yum.repos.d]# yum --disablerepo=* --enablerepo=C7.2.1511* downgrade centos-release\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror\r\nLoading mirror speeds from cached hostfile\r\n\u4f9d\u5b58\u6027\u306e\u89e3\u6c7a\u3092\u3057\u3066\u3044\u307e\u3059\r\n--&gt; \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u78ba\u8a8d\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002\r\n---&gt; \u30d1\u30c3\u30b1\u30fc\u30b8 centos-release.x86_64 0:7-2.1511.el7.centos.2.10 \u3092 \u30c0\u30a6\u30f3\u30b0\u30ec\u30fc\u30c9\r\n---&gt; \u30d1\u30c3\u30b1\u30fc\u30b8 centos-release.x86_64 0:7-3.1611.el7.centos \u3092 \u524a\u9664\r\n--&gt; \u4f9d\u5b58\u6027\u89e3\u6c7a\u3092\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002\r\n\r\n\u4f9d\u5b58\u6027\u3092\u89e3\u6c7a\u3057\u307e\u3057\u305f\r\n\r\n================================================================================================\r\n Package               \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u30fc   \u30d0\u30fc\u30b8\u30e7\u30f3                   \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc        \u5bb9\u91cf\r\n================================================================================================\r\n\u30c0\u30a6\u30f3\u30b0\u30ec\u30fc\u30c9\u4e2d:\r\n centos-release        x86_64             7-2.1511.el7.centos.2.10     C7.2.1511-base      23 k\r\n\r\n\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u8981\u7d04\r\n=================================================================================================\r\n\u30c0\u30a6\u30f3\u30b0\u30ec\u30fc\u30c9  1 \u30d1\u30c3\u30b1\u30fc\u30b8\r\n\r\n\u7dcf\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5bb9\u91cf: 23 k\r\nIs this ok [y\/d\/N]: y\r\nDownloading packages:\r\ncentos-release-7-2.1511.el7.centos.2.10.x86_64.rpm                   |  23 kB  00:00:02\r\nRunning transaction check\r\nRunning transaction test\r\nTransaction test succeeded\r\nRunning transaction\r\n  \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d          : centos-release-7-2.1511.el7.centos.2.10.x86_64          1\/2\r\n  \u6574\u7406\u4e2d                  : centos-release-7-3.1611.el7.centos.x86_64               2\/2\r\n  \u691c\u8a3c\u4e2d                  : centos-release-7-2.1511.el7.centos.2.10.x86_64          1\/2\r\n  \u691c\u8a3c\u4e2d                  : centos-release-7-3.1611.el7.centos.x86_64               2\/2\r\n\r\n\u524a\u9664\u3057\u307e\u3057\u305f:\r\n  centos-release.x86_64 0:7-3.1611.el7.centos\r\n\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb:\r\n  centos-release.x86_64 0:7-2.1511.el7.centos.2.10\r\n\r\n\u5b8c\u4e86\u3057\u307e\u3057\u305f!\r\n[root@master1 yum.repos.d]#\r\n\r\n\r\n\u30d1\u30c3\u30b1\u30fc\u30b8\u7248\u6570\u3092\u78ba\u8a8d\u3059\u308b\u3002\r\ncentos-release\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u7248\u6570\u304c7-2\u306b\u306a\u3063\u3066\u3044\u308b\u3002\u30c0\u30a6\u30f3\u30b0\u30ec\u30fc\u30c9\u3067\u304d\u305f\u3002\r\n[root@master1 yum.repos.d]# rpm -qa|grep centos-release\r\ncentos-release-7-2.1511.el7.centos.2.10.x86_64\r\n[root@master1 yum.repos.d]#\r\n\r\n\r\n<\/code><\/pre>\n<h1>\u5173\u4e8e11\u4e2a\u955c\u50cf\u5217\u8868<\/p>\n<p>\u5f53\u8bbf\u95eerepo\u6587\u4ef6\u7684mirrorlist\u6307\u5b9a\u7684URL\u65f6\uff0c\u5c06\u83b7\u5f97\u5b58\u50a8\u5e93\u670d\u52a1\u5668\u7684\u5217\u8868\u3002<br \/>\n\u5728\u5217\u8868\u4e2d\uff0c\u4f3c\u4e4e\u4f1a\u9009\u62e9\u5ef6\u8fdf\u6700\u5c0f\u7684\u670d\u52a1\u5668\u3002<\/p>\n<h2>11.1 CentOS-Base.repo\u7684\u955c\u50cf\u5217\u8868<\/p>\n<pre class=\"post-pre\"><code>\u5909\u6570\u306f\u4ee5\u4e0b\u306e\u3082\u306e\u3092\u6307\u5b9a\u3059\u308b\u3002\r\n- release \u306f CentOS \u306e\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3(7\u30846)\r\n- arch \u306f i386 \u3084 x86_64 \u306a\u3069\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\r\n- repo \u306f\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u7a2e\u985e(os,updates,extras,centosplus)\r\n\r\nCentOS-Base.repo\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u30df\u30e9\u30fc\u30ea\u30b9\u30c8\u306eURL\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3002\r\n\u30ea\u30dd\u30b8\u30c8\u30ea(os,updates,extras,centosplus)\u6bce\u306b\u30df\u30e9\u30fc\u30ea\u30b9\u30c8\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u3002\r\n[root@master1 ~]# grep mirrorlist \/etc\/yum.repos.d\/CentOS-Base.repo\r\n# If the mirrorlist= does not work for you, as a fall back you can try the\r\nmirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&amp;arch=$basearch&amp;repo=os&amp;infra=$infra\r\nmirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&amp;arch=$basearch&amp;repo=updates&amp;infra=$infra\r\nmirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&amp;arch=$basearch&amp;repo=extras&amp;infra=$infra\r\nmirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&amp;arch=$basearch&amp;repo=centosplus&amp;infra=$infra\r\n[root@master1 ~]#\r\n\r\n------------------------------------------------\r\n1. base(os)\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30df\u30e9\u30fc\u30ea\u30b9\u30c8\u4e00\u89a7\u3092\u8abf\u3079\u308b\r\n------------------------------------------------\r\n[root@master1 ~]# curl 'http:\/\/mirrorlist.centos.org\/?release=7&amp;arch=x86_64&amp;repo=os&amp;infra='\r\nhttp:\/\/ftp.tsukuba.wide.ad.jp\/Linux\/centos\/7.3.1611\/os\/x86_64\/\r\nhttp:\/\/www.ftp.ne.jp\/Linux\/packages\/CentOS\/7.3.1611\/os\/x86_64\/\r\nhttp:\/\/mirror.fairway.ne.jp\/centos\/7.3.1611\/os\/x86_64\/\r\nhttp:\/\/ftp.yz.yamagata-u.ac.jp\/pub\/linux\/centos\/7.3.1611\/os\/x86_64\/\r\nhttp:\/\/ftp.riken.jp\/Linux\/centos\/7.3.1611\/os\/x86_64\/\r\nhttp:\/\/ftp.iij.ad.jp\/pub\/linux\/centos\/7.3.1611\/os\/x86_64\/\r\nhttp:\/\/ftp.jaist.ac.jp\/pub\/Linux\/CentOS\/7.3.1611\/os\/x86_64\/\r\nhttp:\/\/centos.usonyx.net\/main\/7.3.1611\/os\/x86_64\/\r\nhttp:\/\/download.nus.edu.sg\/mirror\/centos\/7.3.1611\/os\/x86_64\/\r\nhttp:\/\/mirror.0x.sg\/centos\/7.3.1611\/os\/x86_64\/\r\n[root@master1 ~]#\r\n\r\n-----------------------------------------------\r\n2. updates\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30df\u30e9\u30fc\u30ea\u30b9\u30c8\u4e00\u89a7\u3092\u8abf\u3079\u308b\r\n-----------------------------------------------\r\n[root@master1 ~]# curl 'http:\/\/mirrorlist.centos.org\/?release=7&amp;arch=x86_64&amp;repo=updates&amp;infra='\r\nhttp:\/\/ftp.riken.jp\/Linux\/centos\/7.3.1611\/updates\/x86_64\/\r\nhttp:\/\/ftp.jaist.ac.jp\/pub\/Linux\/CentOS\/7.3.1611\/updates\/x86_64\/\r\nhttp:\/\/ftp.yz.yamagata-u.ac.jp\/pub\/linux\/centos\/7.3.1611\/updates\/x86_64\/\r\nhttp:\/\/ftp.iij.ad.jp\/pub\/linux\/centos\/7.3.1611\/updates\/x86_64\/\r\nhttp:\/\/www.ftp.ne.jp\/Linux\/packages\/CentOS\/7.3.1611\/updates\/x86_64\/\r\nhttp:\/\/ftp.tsukuba.wide.ad.jp\/Linux\/centos\/7.3.1611\/updates\/x86_64\/\r\nhttp:\/\/mirror.vodien.com\/centos\/7.3.1611\/updates\/x86_64\/\r\nhttp:\/\/download.nus.edu.sg\/mirror\/centos\/7.3.1611\/updates\/x86_64\/\r\nhttp:\/\/mirror.qoxy.com\/centos\/7.3.1611\/updates\/x86_64\/\r\nhttp:\/\/mirror.0x.sg\/centos\/7.3.1611\/updates\/x86_64\/\r\n[root@master1 ~]#\r\n\r\n-----------------------------------------------\r\n3. extras\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30df\u30e9\u30fc\u30ea\u30b9\u30c8\u4e00\u89a7\u3092\u8abf\u3079\u308b\r\n-----------------------------------------------\r\n[root@master1 ~]# curl 'http:\/\/mirrorlist.centos.org\/?release=7&amp;arch=x86_64&amp;repo=extras&amp;infra='\r\nhttp:\/\/ftp.tsukuba.wide.ad.jp\/Linux\/centos\/7.3.1611\/extras\/x86_64\/\r\nhttp:\/\/ftp.yz.yamagata-u.ac.jp\/pub\/linux\/centos\/7.3.1611\/extras\/x86_64\/\r\nhttp:\/\/ftp.riken.jp\/Linux\/centos\/7.3.1611\/extras\/x86_64\/\r\nhttp:\/\/ftp.iij.ad.jp\/pub\/linux\/centos\/7.3.1611\/extras\/x86_64\/\r\nhttp:\/\/ftp.jaist.ac.jp\/pub\/Linux\/CentOS\/7.3.1611\/extras\/x86_64\/\r\nhttp:\/\/www.ftp.ne.jp\/Linux\/packages\/CentOS\/7.3.1611\/extras\/x86_64\/\r\nhttp:\/\/download.nus.edu.sg\/mirror\/centos\/7.3.1611\/extras\/x86_64\/\r\nhttp:\/\/mirror.0x.sg\/centos\/7.3.1611\/extras\/x86_64\/\r\nhttp:\/\/mirror.vastspace.net\/centos\/7.3.1611\/extras\/x86_64\/\r\nhttp:\/\/mirror.qoxy.com\/centos\/7.3.1611\/extras\/x86_64\/\r\n[root@master1 ~]#\r\n\r\n-----------------------------------------------\r\n4. centosplus\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30df\u30e9\u30fc\u30ea\u30b9\u30c8\u4e00\u89a7\u3092\u8abf\u3079\u308b\r\n----------------------------------------------\r\n[root@master1 ~]# curl 'http:\/\/mirrorlist.centos.org\/?release=7&amp;arch=x86_64&amp;repo=centosplus&amp;infra='\r\nhttp:\/\/mirror.fairway.ne.jp\/centos\/7.3.1611\/centosplus\/x86_64\/\r\nhttp:\/\/ftp.tsukuba.wide.ad.jp\/Linux\/centos\/7.3.1611\/centosplus\/x86_64\/\r\nhttp:\/\/www.ftp.ne.jp\/Linux\/packages\/CentOS\/7.3.1611\/centosplus\/x86_64\/\r\nhttp:\/\/ftp.iij.ad.jp\/pub\/linux\/centos\/7.3.1611\/centosplus\/x86_64\/\r\nhttp:\/\/ftp.riken.jp\/Linux\/centos\/7.3.1611\/centosplus\/x86_64\/\r\nhttp:\/\/ftp.yz.yamagata-u.ac.jp\/pub\/linux\/centos\/7.3.1611\/centosplus\/x86_64\/\r\nhttp:\/\/ftp.jaist.ac.jp\/pub\/Linux\/CentOS\/7.3.1611\/centosplus\/x86_64\/\r\nhttp:\/\/mirror.vodien.com\/centos\/7.3.1611\/centosplus\/x86_64\/\r\nhttp:\/\/download.nus.edu.sg\/mirror\/centos\/7.3.1611\/centosplus\/x86_64\/\r\nhttp:\/\/mirror.qoxy.com\/centos\/7.3.1611\/centosplus\/x86_64\/\r\n[root@master1 ~]#\r\n\r\n<\/code><\/pre>\n<h2>11.2 EPEL\u955c\u50cf\u5217\u8868<\/p>\n<pre class=\"post-pre\"><code>[root@master1 ~]# curl 'https:\/\/mirrors.fedoraproject.org\/metalink?repo=epel-7&amp;arch=x86_64'\r\n&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;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\"&gt;\r\n  &lt;files&gt;\r\n    &lt;file name=\"repomd.xml\"&gt;\r\n      &lt;mm0:timestamp&gt;1484693042&lt;\/mm0:timestamp&gt;\r\n      &lt;size&gt;4380&lt;\/size&gt;\r\n      &lt;verification&gt;\r\n        &lt;hash type=\"md5\"&gt;002b06bfffa009b8276b2b89f1b2ac9a&lt;\/hash&gt;\r\n        &lt;hash type=\"sha1\"&gt;ed1769ffbe2ff28a84c1dea2fd3487e72b076418&lt;\/hash&gt;\r\n        &lt;hash type=\"sha256\"&gt;8cd91ff7377feaf93763586d79fb4d4fa5e34222b2d294ed426d75f7962d7866&lt;\/hash&gt;\r\n        &lt;hash type=\"sha512\"&gt;a2ce39fa50341ba5d339b1872fd71cfaa69c86b5e86b6c34318eb9bc1d71a74192ff468de134625f8118451a81c2d06559bd1cc1aa414ccce752dd4cde2008bb&lt;\/hash&gt;\r\n      &lt;\/verification&gt;\r\n      &lt;mm0:alternates&gt;\r\n        &lt;mm0:alternate&gt;\r\n            &lt;mm0:timestamp&gt;1484586449&lt;\/mm0:timestamp&gt;\r\n            &lt;size&gt;4380&lt;\/size&gt;\r\n            &lt;verification&gt;\r\n              &lt;hash type=\"md5\"&gt;555195f5b7cb58d0d28e0678c29e6d72&lt;\/hash&gt;\r\n              &lt;hash type=\"sha1\"&gt;d531faf7c4fc65725300c478daa5eac2304995c0&lt;\/hash&gt;\r\n              &lt;hash type=\"sha256\"&gt;8703524bb7fd15e3ccc012c769c99fdecea7332ac54473e905a3d978e2adbad9&lt;\/hash&gt;\r\n              &lt;hash type=\"sha512\"&gt;bd7dc2e72b3dd0237c237d33484181747b7421fc54fccf7e4f6263c9ab767be62912d854143f67eba024b767a79e88b862f0ee04ec3f3a333af872c62e6ce2a9&lt;\/hash&gt;\r\n            &lt;\/verification&gt;\r\n        &lt;\/mm0:alternate&gt;\r\n      &lt;\/mm0:alternates&gt;\r\n      &lt;resources maxconnections=\"1\"&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"JP\" preference=\"100\" &gt;http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/Fedora\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"rsync\" type=\"rsync\" location=\"JP\" preference=\"100\" &gt;rsync:\/\/ftp.jaist.ac.jp\/pub\/Linux\/Fedora\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"JP\" preference=\"99\" &gt;http:\/\/ftp.riken.jp\/Linux\/fedora\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"rsync\" type=\"rsync\" location=\"JP\" preference=\"99\" &gt;rsync:\/\/ftp.riken.jp\/fedora\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"ID\" preference=\"98\" &gt;http:\/\/kodeterbuka.beritagar.id\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"ID\" preference=\"97\" &gt;http:\/\/kartolo.sby.datautama.net.id\/EPEL\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"rsync\" type=\"rsync\" location=\"ID\" preference=\"97\" &gt;rsync:\/\/kartolo.sby.datautama.net.id\/EPEL\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"HK\" preference=\"96\" &gt;http:\/\/ftp.cuhk.edu.hk\/pub\/linux\/fedora-epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"IN\" preference=\"95\" &gt;http:\/\/epel.mirror.net.in\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"ID\" preference=\"94\" &gt;http:\/\/epel.mirror.angkasa.id\/pub\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"https\" type=\"https\" location=\"ID\" preference=\"94\" &gt;https:\/\/epel.mirror.angkasa.id\/pub\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"rsync\" type=\"rsync\" location=\"ID\" preference=\"94\" &gt;rsync:\/\/epel.mirror.angkasa.id\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"PH\" preference=\"93\" &gt;http:\/\/mirror.pregi.net\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"https\" type=\"https\" location=\"PH\" preference=\"93\" &gt;https:\/\/mirror.pregi.net\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"https\" type=\"https\" location=\"CN\" preference=\"92\" &gt;https:\/\/mirrors.tuna.tsinghua.edu.cn\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"rsync\" type=\"rsync\" location=\"CN\" preference=\"92\" &gt;rsync:\/\/mirrors.tuna.tsinghua.edu.cn\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"CN\" preference=\"92\" &gt;http:\/\/mirrors.tuna.tsinghua.edu.cn\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"IQ\" preference=\"91\" &gt;http:\/\/epel.scopesky.iq\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"IR\" preference=\"90\" &gt;http:\/\/repo.fedoralinux.ir\/pub\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"https\" type=\"https\" location=\"IR\" preference=\"90\" &gt;https:\/\/repo.fedoralinux.ir\/pub\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"PH\" preference=\"89\" &gt;http:\/\/mirror.rise.ph\/fedora-epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"CN\" preference=\"88\" &gt;http:\/\/mirror.lzu.edu.cn\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"https\" type=\"https\" location=\"CN\" preference=\"88\" &gt;https:\/\/mirror.lzu.edu.cn\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"KR\" preference=\"87\" &gt;http:\/\/mirror.premi.st\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"TW\" preference=\"86\" &gt;http:\/\/mirror01.idc.hinet.net\/EPEL\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n        &lt;url protocol=\"http\" type=\"http\" location=\"VN\" preference=\"85\" &gt;http:\/\/mirror.ehost.vn\/epel\/7\/x86_64\/repodata\/repomd.xml&lt;\/url&gt;\r\n      &lt;\/resources&gt;\r\n    &lt;\/file&gt;\r\n  &lt;\/files&gt;\r\n&lt;\/metalink&gt;\r\n[root@master1 ~]#\r\n\r\n<\/code><\/pre>\n<h1>12 yum-config-manager<\/p>\n<p>12\u4e2ayum\u914d\u7f6e\u7ba1\u7406\u5668<\/p>\n<h2>12.1 \u5207\u6362\u4ed3\u5e93\u7684\u542f\u7528\u548c\u7981\u7528\u72b6\u6001<\/p>\n<p>\u4e0d\u8981\u624b\u52a8\u7f16\u8f91repo\u6587\u4ef6\u4ee5\u5207\u6362\u5b58\u50a8\u5e93\u7684\u542f\u7528\u6216\u7981\u7528\u72b6\u6001\uff0c\u800c\u662f\u4f7f\u7528yum-config-manager\u6765\u5207\u6362\u5b58\u50a8\u5e93\u7684\u542f\u7528\u6216\u7981\u7528\u72b6\u6001\u3002<\/p>\n<pre class=\"post-pre\"><code>--------------------------------------------------------------------------------------\r\n1. \u30ea\u30dd\u30b8\u30c8\u30ea\u4e00\u89a7\u306e\u521d\u671f\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u3002\u4e0b\u8a184\u3064\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\r\n--------------------------------------------------------------------------------------\r\n[root@master1 ~]# yum clean all\r\n[root@master1 ~]# yum repolist\r\n-\u4e2d\u7565-\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc ID               \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u540d                                           \u72b6\u614b\r\nbase\/7\/x86_64                 CentOS-7 - Base                                           9,363\r\nepel\/x86_64                   Extra Packages for Enterprise Linux 7 - x86_64           11,049\r\nextras\/7\/x86_64               CentOS-7 - Extras                                           200\r\nupdates\/7\/x86_64              CentOS-7 - Updates                                          752\r\nrepolist: 21,364\r\n\r\n--------------------------------------------------------------------------------------\r\n2. \u30ea\u30dd\u30b8\u30c8\u30ea(C7.1)\u3092\u8ffd\u52a0\u3059\u308b\u3002C7.1\u30ea\u30dd\u30b8\u30c8\u30ea\u30d5\u30a1\u30a4\u30eb\u306eenabled\u304c0-&gt;1\u306b\u306a\u308b\u3002\r\n--------------------------------------------------------------------------------------\r\n[root@master1 ~]# yum-config-manager --enable C7.1*\r\n-\u4ee5\u4e0b\u3001\u7565-\r\n\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8868\u793a\u3059\u308b\u3002C7.1\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u8ffd\u52a0\u3055\u308c\u305f\u3002\r\n[root@master1 ~]# yum repolist\r\n-\u4e2d\u7565-\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc ID                      \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u540d                                       \u72b6\u614b\r\n!C7.1.1503-base\/x86_64               CentOS-7.1.1503 - Base                                8,652\r\n!C7.1.1503-centosplus\/x86_64         CentOS-7.1.1503 - CentOSPlus                             73\r\n!C7.1.1503-extras\/x86_64             CentOS-7.1.1503 - Extras                                285\r\n!C7.1.1503-fasttrack\/x86_64          CentOS-7.1.1503 - CentOSPlus                            110\r\n!C7.1.1503-updates\/x86_64            CentOS-7.1.1503 - Updates                             1,726\r\nbase\/7\/x86_64                        CentOS-7 - Base                                       9,363\r\nepel\/x86_64                          Extra Packages for Enterprise Linux 7 - x86_64       11,049\r\nextras\/7\/x86_64                      CentOS-7 - Extras                                       200\r\nupdates\/7\/x86_64                     CentOS-7 - Updates                                      752\r\nrepolist: 32,210\r\n[root@master1 ~]#\r\n\r\nCentOS-Vault.repo\u3092\u78ba\u8a8d\u3059\u308b\u3002C7.1\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3002\r\n[root@master1 ~]# less \/etc\/yum.repos.d\/CentOS-Vault.repo\r\n# C7.1.1503\r\n[C7.1.1503-base]\r\nenabled=1\r\n[C7.1.1503-updates]\r\nenabled=1\r\n[C7.1.1503-extras]\r\nenabled=1\r\n[C7.1.1503-centosplus]\r\nenabled=1\r\n[C7.1.1503-fasttrack]\r\nenabled=1\r\n\r\n\r\n--------------------------------------------------------------------------------------\r\n3. \u30ea\u30dd\u30b8\u30c8\u30ea(C7.1)\u3092\u524a\u9664\u3059\u308b\u3002C7.1\u30ea\u30dd\u30b8\u30c8\u30ea\u30d5\u30a1\u30a4\u30eb\u306eenabled\u304c1-&gt;0\u306b\u306a\u308b\u3002\r\n--------------------------------------------------------------------------------------\r\n[root@master1 ~]# yum-config-manager --disable C7.1*\r\n-\u4ee5\u4e0b\u3001\u7565-\r\n[root@master1 ~]# yum repolist\r\n-\u4e2d\u7565-\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc ID             \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u540d                                          \u72b6\u614b\r\nbase\/7\/x86_64               CentOS-7 - Base                                          9,363\r\nepel\/x86_64                 Extra Packages for Enterprise Linux 7 - x86_64          11,049\r\nextras\/7\/x86_64             CentOS-7 - Extras                                          200\r\nupdates\/7\/x86_64            CentOS-7 - Updates                                         752\r\nrepolist: 21,364\r\n[root@master1 ~]#\r\n\r\nCentOS-Vault.repo\u3092\u78ba\u8a8d\u3059\u308b\u3002C7.1\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3002\r\n[root@master1 ~]# less \/etc\/yum.repos.d\/CentOS-Vault.repo\r\n# C7.1.1503\r\n[C7.1.1503-base]\r\nenabled=0\r\n[C7.1.1503-updates]\r\nenabled=0\r\n[C7.1.1503-extras]\r\nenabled=0\r\n[C7.1.1503-centosplus]\r\nenabled=0\r\n[C7.1.1503-fasttrack]\r\nenabled=0\r\n\r\n<\/code><\/pre>\n<h1>\u7981\u7528\u6216\u542f\u7528 Nginx \u4ed3\u5e93\u3002<\/p>\n<pre class=\"post-pre\"><code>-------------------------------\r\n1. nginx\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u6709\u52b9\u306b\u3059\u308b\r\n-------------------------------\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002\r\n[root@master1 ~]# yum install http:\/\/nginx.org\/packages\/centos\/7\/noarch\/RPMS\/nginx-release-centos-7-0.el7.ngx.noarch.rpm\r\n-\u4e2d\u7565-\r\n\r\n[root@master1 ~]# rpm -qa|grep nginx-release\r\nnginx-release-centos-7-0.el7.ngx.noarch\r\n\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30ea\u30dd\u30b8\u30c8\u30ea\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u78ba\u8a8d\u3059\u308b\u3002\r\n[root@master1 ~]# cat \/etc\/yum.repos.d\/nginx.repo\r\n# nginx.repo\r\n\r\n[nginx]\r\nname=nginx repo\r\nbaseurl=http:\/\/nginx.org\/packages\/centos\/7\/$basearch\/\r\ngpgcheck=0\r\nenabled=1\r\n\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u4e00\u89a7\u3092\u8868\u793a\u3059\u308b\u3002nginx\u306e\u30ea\u30dd\u30b8\u30c8\u30ea(\u2605\u5370)\u304c\u6709\u52b9\u306b\u306a\u3063\u305f\u306e\u304c\u308f\u304b\u308b\u3002\r\n[root@master1 ~]# yum clean all\r\n[root@master1 ~]# yum repolist\r\n-\u4e2d\u7565-\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc ID         \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u540d                                       \u72b6\u614b\r\nbase\/7\/x86_64           CentOS-7 - Base                                       9,363\r\nepel\/x86_64             Extra Packages for Enterprise Linux 7 - x86_64       11,049\r\nextras\/7\/x86_64         CentOS-7 - Extras                                       200\r\nnginx\/x86_64\u2605          nginx repo                                               41\r\nupdates\/7\/x86_64        CentOS-7 - Updates                                      752\r\nrepolist: 21,405\r\n\r\n\u5229\u7528\u53ef\u80fd\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u3002\r\n[root@master1 ~]# yum --disablerepo=* --enablerepo=nginx list available\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror\r\nLoading mirror speeds from cached hostfile\r\n\u5229\u7528\u53ef\u80fd\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\r\nnginx.x86_64                                   1:1.10.2-1.el7.ngx                              nginx\r\nnginx-debug.x86_64                             1:1.8.0-1.el7.ngx                               nginx\r\nnginx-debuginfo.x86_64                         1:1.10.2-1.el7.ngx                              nginx\r\nnginx-module-geoip.x86_64                      1:1.10.2-1.el7.ngx                              nginx\r\nnginx-module-geoip-debuginfo.x86_64            1:1.10.2-1.el7.ngx                              nginx\r\nnginx-module-image-filter.x86_64               1:1.10.2-1.el7.ngx                              nginx\r\nnginx-module-image-filter-debuginfo.x86_64     1:1.10.2-1.el7.ngx                              nginx\r\nnginx-module-njs.x86_64                        1:1.10.2.0.0.20160414.1c50334fbea6-2.el7.ngx    nginx\r\nnginx-module-njs-debuginfo.x86_64              1:1.10.2.0.0.20160414.1c50334fbea6-2.el7.ngx    nginx\r\nnginx-module-perl.x86_64                       1:1.10.2-1.el7.ngx                              nginx\r\nnginx-module-perl-debuginfo.x86_64             1:1.10.2-1.el7.ngx                              nginx\r\nnginx-module-xslt.x86_64                       1:1.10.2-1.el7.ngx                              nginx\r\nnginx-module-xslt-debuginfo.x86_64             1:1.10.2-1.el7.ngx                              nginx\r\nnginx-nr-agent.noarch                          2.0.0-10.el7.ngx                                nginx\r\n[root@master1 ~]#\r\n\r\nnginx\u306e\u7248\u6570\u4e00\u89a7\u3092\u78ba\u8a8d\u3059\u308b\u3002\r\n[root@master1 ~]# yum --disablerepo=* --enablerepo=nginx --showduplicates list nginx\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror\r\nLoading mirror speeds from cached hostfile\r\n\u5229\u7528\u53ef\u80fd\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\r\nnginx.x86_64                                  1:1.8.0-1.el7.ngx                                nginx\r\nnginx.x86_64                                  1:1.8.1-1.el7.ngx                                nginx\r\nnginx.x86_64                                  1:1.10.0-1.el7.ngx                               nginx\r\nnginx.x86_64                                  1:1.10.1-1.el7.ngx                               nginx\r\nnginx.x86_64                                  1:1.10.2-1.el7.ngx                               nginx\r\n\r\nnginx\u306fepel\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u3082\u3042\u308b\u3002\r\n[root@master1 ~]# yum --showduplicates list nginx\r\n-\u4e2d\u7565-\r\n\u5229\u7528\u53ef\u80fd\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\r\nnginx.x86_64                                   1:1.10.2-1.el7                                   epel\r\n\r\n\r\n--------------------------------------------------------------------\r\n2. nginx\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u7121\u52b9\u306b\u3059\u308b(\u30c6\u30b9\u30c8\u76ee\u7684\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3060\u3051\u306a\u306e\u3067)\r\n--------------------------------------------------------------------\r\n\r\n[root@master1 ~]# yum-config-manager --disable nginx\r\n\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u78ba\u8a8d\u3059\u308b\u3002enabled\u306e\u5024\u304c0(\u7121\u52b9)\u306b\u306a\u3063\u305f\u3002\r\n[root@master1 ~]# cat \/etc\/yum.repos.d\/nginx.repo\r\n# nginx.repo\r\n\r\n[nginx]\r\nname=nginx repo\r\nbaseurl=http:\/\/nginx.org\/packages\/centos\/7\/$basearch\/\r\ngpgcheck=0\r\nenabled=0\r\n\r\n\u6709\u52b9\u306a\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8868\u793a\u3059\u308b\u3002\r\n[root@master1 ~]# yum clean all\r\n[root@master1 ~]# yum repolist\r\n-\u4e2d\u7565-\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc ID          \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u540d                                     \u72b6\u614b\r\nbase\/7\/x86_64            CentOS-7 - Base                                     9,363\r\nepel\/x86_64              Extra Packages for Enterprise Linux 7 - x86_64     11,049\r\nextras\/7\/x86_64          CentOS-7 - Extras                                     200\r\nupdates\/7\/x86_64         CentOS-7 - Updates                                    752\r\nrepolist: 21,364\r\n[root@master1 ~]#\r\n\r\n<\/code><\/pre>\n<h1>14 \u963f\u5c14\u5351\u65af\u5c71<\/p>\n<p>Alpine Linux \u7684\u8f6f\u4ef6\u5305\u7ba1\u7406<\/p>\n<pre class=\"post-pre\"><code>\u30b3\u30f3\u30c6\u30ca(alpine)\u3092\u8d77\u52d5\u3059\u308b\u3002\r\n[root@master1 ~]# docker run -it --name alpine alpine sh\r\n\r\n\u30ea\u30dd\u30b8\u30c8\u30ea\u4e00\u89a7\u3092\u78ba\u8a8d\u3059\u308b\u3002\r\n\/ # cat \/etc\/apk\/repositories\r\nhttp:\/\/dl-cdn.alpinelinux.org\/alpine\/v3.5\/main\r\nhttp:\/\/dl-cdn.alpinelinux.org\/alpine\/v3.5\/community\r\n\r\n\u5229\u7528\u53ef\u80fd\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u4e00\u89a7\u3092\u66f4\u65b0\u3059\u308b\u3002\r\n\/ # apk update\r\nfetch http:\/\/dl-cdn.alpinelinux.org\/alpine\/v3.5\/main\/x86_64\/APKINDEX.tar.gz\r\nfetch http:\/\/dl-cdn.alpinelinux.org\/alpine\/v3.5\/community\/x86_64\/APKINDEX.tar.gz\r\nv3.5.0-50-g72b8702d1f [http:\/\/dl-cdn.alpinelinux.org\/alpine\/v3.5\/main]\r\nv3.5.0-48-g8042937a2f [http:\/\/dl-cdn.alpinelinux.org\/alpine\/v3.5\/community]\r\nOK: 7955 distinct packages available\r\n\/ #\r\n\r\n\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u691c\u7d22\u3059\u308b\u3002\r\n\/ # apk search global\r\nperl-devel-globaldestruction-0.14-r0\r\nperl-symbol-global-name-0.05-r0\r\nperl-symbol-global-name-doc-0.05-r0\r\nperl-devel-globaldestruction-doc-0.14-r0\r\npostfix-3.1.3-r0\r\n\r\n\r\n<\/code><\/pre>\n<h1>\u9650\u5236\u5347\u7ea715\u4e2a\u8f6f\u4ef6\u5305\u7684\u65b9\u6cd5\uff08\u7248\u672c\u9501\u5b9a\uff09<\/p>\n<h2>\u5b89\u88c515.1\u7248\u672c\u7684versionlock\u8f6f\u4ef6\u5305\u3002<\/p>\n<pre class=\"post-pre\"><code>[root@server ~]# yum install yum-plugin-versionlock\r\n<\/code><\/pre>\n<h2>\u7981\u6b6215.2\u66f4\u65b0\u7684\u65b9\u6cd5<\/p>\n<pre class=\"post-pre\"><code>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u3001\u5229\u7528\u53ef\u80fd\u306agcc\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u7248\u6570\u3092\u78ba\u8a8d\u3059\u308b\u3002\r\n[root@server ~]# yum --showduplicates list gcc\r\n-\u4e2d\u7565-\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u30d1\u30c3\u30b1\u30fc\u30b8\r\ngcc.x86_64                                       4.8.5-11.el7                                           @anaconda\r\n\u5229\u7528\u53ef\u80fd\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\r\ngcc.x86_64                                       4.8.5-16.el7                                           base\r\ngcc.x86_64                                       4.8.5-16.el7_4.1                                       updates\r\n\r\n\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u7981\u6b62\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u78ba\u8a8d\u3059\u308b\u3002\u73fe\u5728\u306f\u4f55\u3082\u767b\u9332\u3055\u308c\u3066\u3044\u306a\u3044\u3053\u3068\u304c\u308f\u304b\u308b\u3002\r\n[root@server ~]# cat \/etc\/yum\/pluginconf.d\/versionlock.list\r\n[root@server ~]#\r\n\r\ngcc\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u7981\u6b62\u306b\u3059\u308b\u3002\r\n[root@server ~]# yum versionlock gcc-*\r\n[root@server ~]# cat \/etc\/yum\/pluginconf.d\/versionlock.list\r\n# Added locks on Mon Jan 22 20:15:30 2018\r\n0:gcc-gfortran-4.8.5-11.el7.*\r\n0:gcc-4.8.5-11.el7.*\r\n0:gcc-c++-4.8.5-11.el7.*\r\n\r\ngcc\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3002\u3057\u304b\u3057\u3001\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u304d\u306a\u3044\u3053\u3068\u304c\u308f\u304b\u308b\u3002\r\n[root@server ~]# yum install gcc\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror, priorities, versionlock\r\nfile:\/\/\/tmp\/repo\/repodata\/repomd.xml: [Errno 14] curl#37 - \"Couldn't open file \/tmp\/repo\/repodata\/repomd.xml\"\r\n\u4ed6\u306e\u30df\u30e9\u30fc\u3092\u8a66\u3057\u307e\u3059\u3002\r\nLoading mirror speeds from cached hostfile\r\n * base: ftp.riken.jp\r\n * epel: ftp.riken.jp\r\n * extras: ftp.riken.jp\r\n * ius: iad.mirror.rackspace.com\r\n * updates: ftp.riken.jp\r\n8 packages excluded due to repository priority protections\r\n\u4f55\u3082\u3057\u307e\u305b\u3093\r\n\r\n<\/code><\/pre>\n<h2>\u5982\u4f55\u89e3\u9664\u7981\u6b6215.3\u5347\u7ea7\u7684\u65b9\u6cd5\u3002<\/p>\n<pre class=\"post-pre\"><code>\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u7981\u6b62\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u4e00\u89a7\u3092\u78ba\u8a8d\u3059\u308b\u3002\r\n[root@server ~]# yum versionlock list\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror, priorities, versionlock\r\n0:gcc-gfortran-4.8.5-11.el7.*\r\n0:gcc-4.8.5-11.el7.*\r\n0:gcc-c++-4.8.5-11.el7.*\r\nversionlock list done\r\n\r\n\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u7981\u6b62\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u8a2d\u5b9a\u3092\u89e3\u9664\u3059\u308b\u3002\r\n[root@server ~]# yum versionlock clear\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror, priorities, versionlock\r\nversionlock cleared\r\n\r\n\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u7981\u6b62\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u4e00\u89a7\u3092\u8868\u793a\u3059\u308b\u3002\r\n[root@server ~]# yum versionlock list\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror, priorities, versionlock\r\nversionlock list done\r\n\r\ngcc\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u304d\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3002\r\n[root@server ~]# yum install gcc\r\n-\u4e2d\u7565-\r\n=================================================================================================================\r\n Package                         \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u30fc     \u30d0\u30fc\u30b8\u30e7\u30f3                     \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc           \u5bb9\u91cf\r\n=================================================================================================================\r\n\u66f4\u65b0\u3057\u307e\u3059:\r\n gcc                             x86_64               4.8.5-16.el7_4.1               updates                16 M\r\n\u4f9d\u5b58\u6027\u95a2\u9023\u3067\u306e\u66f4\u65b0\u3092\u3057\u307e\u3059:\r\n cpp                             x86_64               4.8.5-16.el7_4.1               updates               5.9 M\r\n gcc-c++                         x86_64               4.8.5-16.el7_4.1               updates               7.2 M\r\n gcc-gfortran                    x86_64               4.8.5-16.el7_4.1               updates               6.6 M\r\n libgcc                          x86_64               4.8.5-16.el7_4.1               updates                98 k\r\n libgfortran                     x86_64               4.8.5-16.el7_4.1               updates               296 k\r\n libgomp                         x86_64               4.8.5-16.el7_4.1               updates               154 k\r\n libquadmath                     x86_64               4.8.5-16.el7_4.1               updates               186 k\r\n libquadmath-devel               x86_64               4.8.5-16.el7_4.1               updates                49 k\r\n libstdc++                       x86_64               4.8.5-16.el7_4.1               updates               301 k\r\n libstdc++-devel                 x86_64               4.8.5-16.el7_4.1               updates               1.5 M\r\n\r\n\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u8981\u7d04\r\n=================================================================================================================\r\n\u66f4\u65b0  1 \u30d1\u30c3\u30b1\u30fc\u30b8 (+10 \u500b\u306e\u4f9d\u5b58\u95a2\u4fc2\u306e\u30d1\u30c3\u30b1\u30fc\u30b8)\r\n\r\n\u7dcf\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5bb9\u91cf: 38 M\r\nIs this ok [y\/d\/N]:\r\n\r\n<\/code><\/pre>\n<h1>\u8bf7\u53c2\u8003\u4ee5\u4e0b\u8d44\u6599<\/p>\n<p>\u7406\u7814\u7684\u5b58\u50a8\u5e93<br \/>\n\u955c\u50cf\u5217\u8868\u7684\u72b6\u6001<\/p>\n<p>RHEL6\u624b\u518c<br \/>\n\u5c06\u6392\u9664\u7684\u66f4\u65b0\u5bf9\u8c61\u79fb\u9664<br \/>\n\u8f6f\u4ef6\u5305\u7ba1\u7406\uff5c\u4ec0\u4e48\u662fyum<br \/>\n\u901a\u8fc7\u66f4\u6539yum\u5f15\u7528\u7684\u955c\u50cf\u7ad9\u70b9\u7684baseurl\u6765\u8bbe\u7f6e\u65e5\u672c\u5883\u5185\u7684\u7ad9\u70b9<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148\u3002 \u5728\u8fdb\u884c\u672c\u6b21\u9a8c\u8bc1\u65f6\uff0c\u6211\u4eec\u5220\u9664\u4e86 CentOS-Media.repo \u6587\u4ef6\uff0c\u56e0\u4e3a\u5b83\u4f1a\u5bfc\u81f4\u5728\u6267\u884c yum &#038; [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-25980","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;) - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;)\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0yum\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;)\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;)\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0yum\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-03T02:02:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-11T09:47:49+00:00\" \/>\n<meta name=\"author\" content=\"\u6587, \u7fd4\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6587, \u7fd4\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/\",\"name\":\"\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;) - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-07-03T02:02:41+00:00\",\"dateModified\":\"2025-08-11T09:47:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\"},\"description\":\"\u5173\u4e8e\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;)\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\",\"name\":\"\u6587, \u7fd4\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"caption\":\"\u6587, \u7fd4\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;) - Blog - Silicon Cloud","description":"\u5173\u4e8e\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;)\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0yum\/","og_locale":"zh_CN","og_type":"article","og_title":"\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;)","og_description":"\u5173\u4e8e\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;)\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0yum\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-07-03T02:02:41+00:00","article_modified_time":"2025-08-11T09:47:49+00:00","author":"\u6587, \u7fd4","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6587, \u7fd4","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/","name":"\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;) - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-07-03T02:02:41+00:00","dateModified":"2025-08-11T09:47:49+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c"},"description":"\u5173\u4e8e\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;)\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u867d\u7136\u6709\u4e9b\u665a\u4e86\uff0c\u4f46\u662f\u6211\u73b0\u5728\u624d\u53d1\u73b0Yum (^^;)"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c","name":"\u6587, \u7fd4","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","caption":"\u6587, \u7fd4"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%99%bd%e7%84%b6%e6%9c%89%e4%ba%9b%e6%99%9a%e4%ba%86%ef%bc%8c%e4%bd%86%e6%98%af%e6%88%91%e7%8e%b0%e5%9c%a8%e6%89%8d%e5%8f%91%e7%8e%b0yum\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/25980","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=25980"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/25980\/revisions"}],"predecessor-version":[{"id":110953,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/25980\/revisions\/110953"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=25980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=25980"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=25980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}