解决方案 :"1月11日ECS Linux系统安装源(yum/deb/apt等)服务暂停与升级"
2018-01-10 14:24
351 查看
这里就是重点来了,如何解决本次的软件源暂时无法使用的问题呢? 那就是提前换一个可以使用的软件源。
这里需要用到代码编辑器和SFTP软件,如果没有安装,建议参考:【云计算的1024种玩法】ECS和轻量应用服务器的远程控制入门
RHEL、CentoS
修改 /etc/yum.repos.d/ 目录下的文件,例如:CentOS-Base.repo 、epel.repo 等,这里以修改 CentOS 7 本身的软件源文件 CentOS-Base.repo 为例:
将 CentOS-Base.repo 修改为 CentOS-Base.repo.old
然后创建一个新的 CentOS-Base.repo 文件,写入清华源的内容:
复制代码
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
阅读原文
这里需要用到代码编辑器和SFTP软件,如果没有安装,建议参考:【云计算的1024种玩法】ECS和轻量应用服务器的远程控制入门
RHEL、CentoS
修改 /etc/yum.repos.d/ 目录下的文件,例如:CentOS-Base.repo 、epel.repo 等,这里以修改 CentOS 7 本身的软件源文件 CentOS-Base.repo 为例:
将 CentOS-Base.repo 修改为 CentOS-Base.repo.old
然后创建一个新的 CentOS-Base.repo 文件,写入清华源的内容:
复制代码
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
阅读原文
相关文章推荐
- python升级带来的yum异常:File "/usr/bin/yum", line 30
- "监听程序当前无法识别连接描述符中请求服务"解决方案
- Ctrl+alt+T打不开终端以及ppa安装时No module named "apt_pkg"解决方案
- CentOS 6 升级python2.66 到2.78 yum 无法使用解决方案
- 升级Python而导致的YUM服务无法使用的修复方法
- 支付宝也要上"服务号"?斗战微信继续升级
- 数据连接到 Web 服务 InfoPath 2010 窗体中的 SharePoint 服务器上运行时的错误消息:"401-未经授权"解决方案
- 升级sp3后出现"一个问题阻止windows正确检测此机器许可证"解决方案
- Ubuntu升级到16.04后出现"Failed to start Load Kernel Modules"问题的解决方案
- "ORA-12514 TNS监听程序当前无法识别连接描述符中请求服务"错误解决方案
- Windows XP IIS 500内部错误 解决方案(HTTP 500内部服务器错误) 按以下步骤进行: 1.在控制面板->管理工具->服务 中确认"Distributed Transactio
- IOS- 企业App"无法升级安装应用程序 因为证书无效"的解决方案
- CentOS 6.4升级Python后yum不可用的解决方案
- [紧急问题和解决方案] 无法打开被"权限管理服务"(RMS)加密的Office 2003文档
- CentOS 6.5升级Python后yum不可用的解决方案
- 阿里云容器服务区块链解决方案全新升级 支持Hyperledger Fabric v1.1
- yum(deb)和rpm(apt)区别
- centos6.5升级python带来的问题:yum异常:File "/usr/bin/yum", line 30..........
- 阿里云yum不升级内核的解决方案
- vs2010打包windows服务安装包版本升级的解决方案