1. WARNING! The remote SSH server rejected X11 forwarding request.
    2. Last login: Sat Oct 20 10:35:24 2018
    3. [root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    4. [root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    5. -bash: wget: 未找到命令
    6. [root@localhost ~]# sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    7. sudo: wget:找不到命令
    8. [root@localhost ~]# yum -y install wget
    9. 已加载插件:fastestmirror
    10. There are no enabled repos.
    11. Run "yum repolist all" to see the repos you have.
    12. To enable Red Hat Subscription Management repositories:
    13. subscription-manager repos --enable <repo>
    14. To enable custom repositories:
    15. yum-config-manager --enable <repo>
    16. [root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    17. mv: 无法获取"/etc/yum.repos.d/CentOS-Base.repo" 的文件状态(stat): 没有那个文件或目录
    18. [root@localhost ~]# ^C
    19. [root@localhost ~]# ^C
    20. [root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    21. mv: 无法获取"/etc/yum.repos.d/CentOS-Base.repo" 的文件状态(stat): 没有那个文件或目录
    22. [root@localhost ~]# sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    23. sudo: wget:找不到命令
    24. [root@localhost ~]# ^C
    25. [root@localhost ~]# ^C
    26. [root@localhost ~]# wget option url
    27. -bash: wget: 未找到命令
    28. [root@localhost ~]# wget option
    29. -bash: wget: 未找到命令
    30. [root@localhost ~]# sudo yum -y install wget
    31. 已加载插件:fastestmirror
    32. There are no enabled repos.
    33. Run "yum repolist all" to see the repos you have.
    34. To enable Red Hat Subscription Management repositories:
    35. subscription-manager repos --enable <repo>
    36. To enable custom repositories:
    37. yum-config-manager --enable <repo>
    38. [root@localhost ~]# yum clean all
    39. 已加载插件:fastestmirror
    40. There are no enabled repos.
    41. Run "yum repolist all" to see the repos you have.
    42. To enable Red Hat Subscription Management repositories:
    43. subscription-manager repos --enable <repo>
    44. To enable custom repositories:
    45. yum-config-manager --enable <repo>
    46. [root@localhost ~]# rpm -qa yum
    47. yum-3.4.3-158.el7.centos.noarch

    解决:CentOS 7 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 或者 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

    [root@orcl-server soft]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 2523 100 2523 0 0 8089 0 —:—:— —:—:— —:—:— 8112
    [root@orcl-server soft]# wget
    -bash: wget: 未找到命令
    [root@orcl-server soft]# yum -y install wget
    已加载插件:fastestmirror
    Determining fastest mirrors
    base: mirrors.aliyun.com
    extras: mirrors.aliyun.com
    * updates: mirrors.aliyun.com
    base | 3.6 kB 00:00:00
    extras | 2.9 kB 00:00:00
    updates | 2.9 kB 00:00:00
    (1/4): updates/7/x86_64/primary_db | 2.5 MB 00:00:00
    (2/4): base/7/x86_64/group_gz | 153 kB 00:00:00
    (3/4): extras/7/x86_64/primary_db | 222 kB 00:00:05
    base/7/x86_64/primary_db FAILED
    http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/6d0c3a488c282fe537794b5946b01e28c7f44db79097bb06826e1c0c88bad5ef-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/6d0c3a488c282fe537794b5946b01e28c7f44db79097bb06826e1c0c88bad5ef-primary.sqlite.bz2: (28, ‘Connection timed out after 30001 milliseconds’)
    正在尝试其它镜像。
    (4/4): base/7/x86_64/primary_db | 6.1 MB 00:00:00
    正在解决依赖关系
    —> 正在检查事务
    —-> 软件包 wget.x86_64.0.1.14-18.el7_6.1 将被 安装
    —> 解决依赖关系完成
    依赖关系解决
    ========================================================================================
    Package 架构 版本 源 大小
    ========================================================================================
    正在安装:
    wget x86_64 1.14-18.el7_6.1 base 547 k
    事务概要
    ========================================================================================
    安装 1 软件包
    总下载量:547 k
    安装大小:2.0 M
    Downloading packages:
    警告:/var/cache/yum/x86_64/7/base/packages/wget-1.14-18.el7_6.1.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
    wget-1.14-18.el7_6.1.x86_64.rpm 的公钥尚未安装
    wget-1.14-18.el7_6.1.x86_64.rpm | 547 kB 00:00:05
    http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 检索密钥
    导入 GPG key 0xF4A80EB5:
    用户ID : “CentOS-7 Key (CentOS 7 Official Signing Key) security@centos.org
    指纹 : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
    来自 : http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
    正在安装 : wget-1.14-18.el7_6.1.x86_64 1/1
    验证中 : wget-1.14-18.el7_6.1.x86_64 1/1
    已安装:
    wget.x86_64 0:1.14-18.el7_6.1
    完毕!