Yum repolist命令

in 互联网技术 with 0 comment  访问: 514 次

1. 场景

公司使用yum install --disablerepo=* --enablerepo=[xxx] mysql命令后,发现其他yum源不能用

2. 分析

1、查看当前可用yum源:yum repolist

[root@steven ~] # yum repolist
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.huaweicloud.com
源标识                                                                   源名称                                                                                                状态
!base/7/x86_64                                                           CentOS-7 - Base                                                                                       10,019
*!epel/x86_64                                                            Extra Packages for Enterprise Linux 7 - x86_64                                                        13,049
!extras/7/x86_64                                                         CentOS-7 - Extras                                                                                        385
!updates/7/x86_64                                                        CentOS-7 - Updates                                                                                     1,511
repolist: 24,964

2、查看所有yum源:yum repolist all
发现很多yum被禁用:

[root@steven ~] # yum repolist all
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.huaweicloud.com
源标识                                                            源名称                                                                                                 状态
C7.0.1406-base/x86_64                                             CentOS-7.0.1406 - Base                                                                                 禁用
C7.0.1406-centosplus/x86_64                                       CentOS-7.0.1406 - CentOSPlus                                                                           禁用
C7.0.1406-extras/x86_64                                           CentOS-7.0.1406 - Extras                                                                               禁用
C7.0.1406-fasttrack/x86_64                                        CentOS-7.0.1406 - CentOSPlus                                                                           禁用
C7.0.1406-updates/x86_64                                          CentOS-7.0.1406 - Updates                                                                              禁用
C7.1.1503-base/x86_64                                             CentOS-7.1.1503 - Base                                                                                 禁用
C7.1.1503-centosplus/x86_64                                       CentOS-7.1.1503 - CentOSPlus                                                                           禁用
C7.1.1503-extras/x86_64                                           CentOS-7.1.1503 - Extras                                                                               禁用
C7.1.1503-fasttrack/x86_64                                        CentOS-7.1.1503 - CentOSPlus                                                                           禁用
C7.1.1503-updates/x86_64                                          CentOS-7.1.1503 - Updates                                                                              禁用
C7.2.1511-base/x86_64                                             CentOS-7.2.1511 - Base                                                                                 禁用
C7.2.1511-centosplus/x86_64                                       CentOS-7.2.1511 - CentOSPlus                                                                           禁用
C7.2.1511-extras/x86_64                                           CentOS-7.2.1511 - Extras                                                                               禁用
C7.2.1511-fasttrack/x86_64                                        CentOS-7.2.1511 - CentOSPlus                                                                           禁用
C7.2.1511-updates/x86_64                                          CentOS-7.2.1511 - Updates                                                                              禁用
C7.3.1611-base/x86_64                                             CentOS-7.3.1611 - Base                                                                                 禁用
C7.3.1611-centosplus/x86_64                                       CentOS-7.3.1611 - CentOSPlus                                                                           禁用
C7.3.1611-extras/x86_64                                           CentOS-7.3.1611 - Extras                                                                               禁用
C7.3.1611-fasttrack/x86_64                                        CentOS-7.3.1611 - CentOSPlus                                                                           禁用
C7.3.1611-updates/x86_64                                          CentOS-7.3.1611 - Updates                                                                              禁用
!TouShiKe                                                        TouShiKe                                                                                             禁用
!base/7/x86_64                                                    CentOS-7 - Base                                                                                        启用: 10,019
base-debuginfo/x86_64                                             CentOS-7 - Debuginfo                                                                                   禁用
base-source/7                                                     CentOS-7 - Base Sources                                                                                禁用
c7-media                                                          CentOS-7 - Media                                                                                       禁用
centosplus/7/x86_64                                               CentOS-7 - Plus                                                                                        禁用
centosplus-source/7                                               CentOS-7 - Plus Sources                                                                                禁用
cr/7/x86_64                                                       CentOS-7 - cr                                                                                          禁用
*!epel/x86_64                                                     Extra Packages for Enterprise Linux 7 - x86_64                                                         启用: 13,049
epel-debuginfo/x86_64                                             Extra Packages for Enterprise Linux 7 - x86_64 - Debug                                                 禁用
epel-source/x86_64                                                Extra Packages for Enterprise Linux 7 - x86_64 - Source                                                禁用
epel-testing/x86_64                                               Extra Packages for Enterprise Linux 7 - Testing - x86_64                                               禁用
epel-testing-debuginfo/x86_64                                     Extra Packages for Enterprise Linux 7 - Testing - x86_64 - Debug                                       禁用
epel-testing-source/x86_64                                        Extra Packages for Enterprise Linux 7 - Testing - x86_64 - Source                                      禁用
!extras/7/x86_64                                                  CentOS-7 - Extras                                                                                      启用:    385
extras-source/7                                                   CentOS-7 - Extras Sources                                                                              禁用
fasttrack/7/x86_64                                                CentOS-7 - fasttrack                                                                                   禁用
!updates/7/x86_64                                                 CentOS-7 - Updates                                                                                     启用:  1,511
updates-source/7                                                  CentOS-7 - Updates Sources                                                                             禁用

启用某yum源:yum-config-manager --enable updates-source

WeZan
Responses