WARNING! The remote SSH server rejected X11 forwarding request.Last login: Sat Oct 20 10:35:24 2018[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo-bash: wget: 未找到命令[root@localhost ~]# sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.reposudo: wget:找不到命令[root@localhost ~]# yum -y install wget已加载插件:fastestmirrorThere are no enabled repos.Run "yum repolist all" to see the repos you have.To enable Red Hat Subscription Management repositories:subscription-manager repos --enable <repo>To enable custom repositories:yum-config-manager --enable <repo>[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backupmv: 无法获取"/etc/yum.repos.d/CentOS-Base.repo" 的文件状态(stat): 没有那个文件或目录[root@localhost ~]# ^C[root@localhost ~]# ^C[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backupmv: 无法获取"/etc/yum.repos.d/CentOS-Base.repo" 的文件状态(stat): 没有那个文件或目录[root@localhost ~]# sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.reposudo: wget:找不到命令[root@localhost ~]# ^C[root@localhost ~]# ^C[root@localhost ~]# wget option url-bash: wget: 未找到命令[root@localhost ~]# wget option-bash: wget: 未找到命令[root@localhost ~]# sudo yum -y install wget已加载插件:fastestmirrorThere are no enabled repos.Run "yum repolist all" to see the repos you have.To enable Red Hat Subscription Management repositories:subscription-manager repos --enable <repo>To enable custom repositories:yum-config-manager --enable <repo>[root@localhost ~]# yum clean all已加载插件:fastestmirrorThere are no enabled repos.Run "yum repolist all" to see the repos you have.To enable Red Hat Subscription Management repositories:subscription-manager repos --enable <repo>To enable custom repositories:yum-config-manager --enable <repo>[root@localhost ~]# rpm -qa yumyum-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
完毕!
