任何人都知道为什么两台服务器显示不同的 yum 可用软件包

任何人都知道为什么两台服务器显示不同的 yum 可用软件包

我有两台 CentOS 7.3 的服务器,但是

服务器1

[root@frontalb]# cat /etc/*release
CentOS Linux release 7.3.1611 (Core) 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.3.1611 (Core) 
CentOS Linux release 7.3.1611 (Core) 

服务器2

[root@frontala]# cat /etc/*release
CentOS Linux release 7.3.1611 (Core) 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.3.1611 (Core) 
CentOS Linux release 7.3.1611 (Core)

当我检查 repolist Frontala 时,显示可用的软件包比 frontalb 少

[root@frontalb yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base epel extras puppetlabs-deps puppetlabs-products updates
Cleaning up everything
Cleaning up list of fastest mirrors
[root@frontalb yum.repos.d]# yum repolist
Loaded plugins: fastestmirror
base                                                                                                                                                                         | 3.6 kB  00:00:00     
epel/x86_64/metalink                                                                                                                                                         |  26 kB  00:00:00     
epel                                                                                                                                                                         | 4.3 kB  00:00:00     
extras                                                                                                                                                                       | 3.4 kB  00:00:00     
puppetlabs-deps                                                                                                                                                              | 2.5 kB  00:00:00     
puppetlabs-products                                                                                                                                                          | 2.5 kB  00:00:00     
updates                                                                                                                                                                      | 3.4 kB  00:00:00     
(1/9): base/7/x86_64/group_gz                                                                                                                                                | 155 kB  00:00:00     
(2/9): epel/x86_64/group_gz                                                                                                                                                  | 170 kB  00:00:00     
(3/9): base/7/x86_64/primary_db                                                                                                                                              | 5.6 MB  00:00:00     
(4/9): epel/x86_64/updateinfo                                                                                                                                                | 793 kB  00:00:00     
(5/9): extras/7/x86_64/primary_db                                                                                                                                            | 151 kB  00:00:00     
(6/9): puppetlabs-products/x86_64/primary_db                                                                                                                                 |  69 kB  00:00:00     
(7/9): puppetlabs-deps/x86_64/primary_db                                                                                                                                     | 8.4 kB  00:00:00     
(8/9): epel/x86_64/primary_db                                                                                                                                                | 4.7 MB  00:00:00     
(9/9): updates/7/x86_64/primary_db                                                                                                                                           | 4.8 MB  00:00:00     
Determining fastest mirrors
 * base: ftp.heanet.ie
 * epel: s3-mirror-eu-west-1.fedoraproject.org
 * extras: ftp.heanet.ie
 * updates: ftp.heanet.ie
repo id                                                                              repo name                                                                                                status
base/7/x86_64                                                                        CentOS-7 - Base                                                                                           9,363
epel/x86_64                                                                          Extra Packages for Enterprise Linux 7 - x86_64                                                           11,629
extras/7/x86_64                                                                      CentOS-7 - Extras                                                                                           337
puppetlabs-deps/x86_64                                                               Puppet Labs Dependencies El 7 - x86_64                                                                       17
puppetlabs-products/x86_64                                                           Puppet Labs Products El 7 - x86_64                                                                          225
updates/7/x86_64                                                                     CentOS-7 - Updates                                                                                        1,585
repolist: 23,156

在frontala repolist上只有23,001

[root@frontala yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base epel extras puppetlabs-deps puppetlabs-products updates
Cleaning up everything
Cleaning up list of fastest mirrors
[root@frontala yum.repos.d]# yum repolist
Loaded plugins: fastestmirror
base                                                                                                                                                                         | 3.6 kB  00:00:00     
epel/x86_64/metalink                                                                                                                                                         |  26 kB  00:00:00     
epel                                                                                                                                                                         | 4.3 kB  00:00:00     
extras                                                                                                                                                                       | 3.4 kB  00:00:00     
puppetlabs-deps                                                                                                                                                              | 2.5 kB  00:00:00     
puppetlabs-products                                                                                                                                                          | 2.5 kB  00:00:00     
updates                                                                                                                                                                      | 3.4 kB  00:00:00     
(1/9): base/7/x86_64/group_gz                                                                                                                                                | 155 kB  00:00:00     
(2/9): epel/x86_64/group_gz                                                                                                                                                  | 170 kB  00:00:00     
(3/9): epel/x86_64/updateinfo                                                                                                                                                | 793 kB  00:00:00     
(4/9): extras/7/x86_64/primary_db                                                                                                                                            | 151 kB  00:00:00     
(5/9): puppetlabs-products/x86_64/primary_db                                                                                                                                 |  69 kB  00:00:00     
(6/9): puppetlabs-deps/x86_64/primary_db                                                                                                                                     | 8.4 kB  00:00:00     
(7/9): base/7/x86_64/primary_db                                                                                                                                              | 5.6 MB  00:00:00     
(8/9): updates/7/x86_64/primary_db                                                                                                                                           | 4.8 MB  00:00:00     
(9/9): epel/x86_64/primary_db                                                                                                                                                | 4.7 MB  00:00:00     
Determining fastest mirrors
 * base: ftp.heanet.ie
 * epel: s3-mirror-eu-west-1.fedoraproject.org
 * extras: ftp.heanet.ie
 * updates: ftp.heanet.ie
repo id                                                                            repo name                                                                                               status
base/7/x86_64                                                                      CentOS-7 - Base                                                                                          9,313+50
epel/x86_64                                                                        Extra Packages for Enterprise Linux 7 - x86_64                                                           11,624+5
extras/7/x86_64                                                                    CentOS-7 - Extras                                                                                             337
puppetlabs-deps/x86_64                                                             Puppet Labs Dependencies El 7 - x86_64                                                                         17
puppetlabs-products/x86_64                                                         Puppet Labs Products El 7 - x86_64                                                                            225
updates/7/x86_64                                                                   CentOS-7 - Updates                                                                                      1,485+100
repolist: 23,001

例如,当我想要更新 java 时,我开始遇到问题,我只能在两台服务器之一中更新

弗龙塔拉

[root@frontala yum.repos.d]# yum info java-1.7.0-openjdk
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.heanet.ie
 * epel: s3-mirror-eu-west-1.fedoraproject.org
 * extras: ftp.heanet.ie
 * updates: ftp.heanet.ie
Installed Packages
Name        : java-1.7.0-openjdk
Arch        : x86_64
Epoch       : 1
Version     : 1.7.0.121
Release     : 2.6.8.0.el7_3
Size        : 549 k
Repo        : installed
Summary     : OpenJDK Runtime Environment
URL         : http://openjdk.java.net/
License     : ASL 1.1 and ASL 2.0 and GPL+ and GPLv2 and GPLv2 with exceptions and LGPL+ and LGPLv2 and MPLv1.0 and MPLv1.1 and Public Domain and W3C
Description : The OpenJDK runtime environment.

额叶

[root@cpe0012046-frontb yum.repos.d]# yum info java-1.7.0-openjdk
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.heanet.ie
 * epel: s3-mirror-eu-west-1.fedoraproject.org
 * extras: ftp.heanet.ie
 * updates: ftp.heanet.ie
Installed Packages
Name        : java-1.7.0-openjdk
Arch        : x86_64
Epoch       : 1
Version     : 1.7.0.131
Release     : 2.6.9.0.el7_3
Size        : 549 k
Repo        : installed
From repo   : updates
Summary     : OpenJDK Runtime Environment
URL         : http://openjdk.java.net/
License     : ASL 1.1 and ASL 2.0 and GPL+ and GPLv2 and GPLv2 with exceptions and LGPL+ and LGPLv2 and MPLv1.0 and MPLv1.1 and Public Domain and W3C
Description : The OpenJDK runtime environment.

Available Packages
Name        : java-1.7.0-openjdk
Arch        : x86_64
Epoch       : 1
Version     : 1.7.0.141
Release     : 2.6.10.1.el7_3
Size        : 231 k
Repo        : updates/7/x86_64
Summary     : OpenJDK Runtime Environment
URL         : http://openjdk.java.net/
License     : ASL 1.1 and ASL 2.0 and GPL+ and GPLv2 and GPLv2 with exceptions and LGPL+ and LGPLv2 and MPLv1.0 and MPLv1.1 and Public Domain and W3C
Description : The OpenJDK runtime environment.

答案1

这里的提示是以下目录中存在排除的软件包yum repolist

repo id                                                                            repo name                                                                                               status
base/7/x86_64                                                                      CentOS-7 - Base                                                                                          9,313+50
epel/x86_64                                                                        Extra Packages for Enterprise Linux 7 - x86_64                                                           11,624+5
extras/7/x86_64                                                                    CentOS-7 - Extras                                                                                             337
puppetlabs-deps/x86_64                                                             Puppet Labs Dependencies El 7 - x86_64                                                                         17
puppetlabs-products/x86_64                                                         Puppet Labs Products El 7 - x86_64                                                                            225
updates/7/x86_64                                                                   CentOS-7 - Updates                                                                                      1,485+100

...如加号所示:1,485+100

Frontalb 机器将 java 包显示在updates/7/x86_64存储库中,因此需要从 Frontala 上的存储库中删除排除项,以便它能够看到 java 包。

相关内容