惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
MyScale Blog
MyScale Blog
Y
Y Combinator Blog
罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
V
Vulnerabilities – Threatpost
T
The Blog of Author Tim Ferriss
云风的 BLOG
云风的 BLOG
Recorded Future
Recorded Future
N
News and Events Feed by Topic
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 【当耐特】
N
Netflix TechBlog - Medium
博客园 - 叶小钗
B
Blog
Vercel News
Vercel News
T
Tenable Blog
T
The Exploit Database - CXSecurity.com
Spread Privacy
Spread Privacy
T
Threat Research - Cisco Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
F
Fortinet All Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Microsoft Security Blog
Microsoft Security Blog
S
Securelist
Microsoft Azure Blog
Microsoft Azure Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Palo Alto Networks Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
DataBreaches.Net
Cyberwarzone
Cyberwarzone
Engineering at Meta
Engineering at Meta
Martin Fowler
Martin Fowler
G
GRAHAM CLULEY
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
A
Arctic Wolf
C
CERT Recently Published Vulnerability Notes
L
LangChain Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
Check Point Blog
A
About on SuperTechFans
W
WeLiveSecurity
The GitHub Blog
The GitHub Blog

博客园 - hiaming

doclever 5.5.1 安装及升级【原创】 SPARROW-JS 从0开始写 0依赖,原生JS框架 Sparrow算法篇 从日期取交集到思维模式-2 高性能轻量级markdown 解析器java 版sparrow-markdown Sparrow 算法篇 由日期取交集到思维模式 自己动手写mvc框架SPARROW MVC REDIS客户端封装实践2 SPARROW 框架redis客户端封装实践 SPARROW架构介绍 Sparrow 框架设计哲学 陌院俅颗难炎先当粮澜 openresty在centos/redhat6.7上部署 tomcat 日志那点事 Quartz corn时间表达式(转) Jquery控制滚动Div 滚动条事件 fastjson排序 Map多层嵌套转换自动排序问题终极解决方案 Spring 外部注入Bean (JAX-WS) SSH,如何恢复通过输入密码的方式来登录服务器 Redhat Linux6.5 开启VNC 远程桌面
Redhat6.7 切换Centos yum源
hiaming · 2016-11-09 · via 博客园 - hiaming

RedHat 更换Yum源

1.检查yum包 rpm -qa |grep yum

2.删除自带包

rpm -aq | grep yum | xargs rpm -e --nodeps

3.再检查一下

rpm -qa |grep yum

4.下载更新包

5.执行安装

rpm -ivh yum-*

如果出现

error: Failed dependencies:

        python-urlgrabber >= 3.9.1-10 is needed by yum-3.2.29-73.el6.centos.noarch

不要慌,这个问题很恶心会导致后面安装前功尽弃,使用下面

rpm -Uvh python-urlgrabber-3.9.1-11.el6.noarch.rpm

更新rpm -Uvh python-urlgrabber版本,不更新肯定安装不过去

在执行:

rpm -ivh yum-*

warning: yum-3.2.29-73.el6.centos.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY

Preparing...                ########################################### [100%]

   1:yum-metadata-parser    ########################################### [ 20%]

   2:yum-plugin-fastestmirro########################################### [ 40%]

   3:yum                    ########################################### [ 60%]

   4:yum-updateonboot       ########################################### [ 80%]

   5:yum-utils              ########################################### [100%]

安装成功了

6.切换源

cd /etc/yum.repos.d/ 

mv redhat.repo redhat.repo.bak

mv rhel-source.repo rhel-source.repo.bak

vi /etc/yum.repos.d/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-6 - Base - 163.com

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os

baseurl=http://mirrors.163.com/centos/7/os/$basearch/

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#released updates

[updates]

name=CentOS-6 - Updates - 163.com

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates

baseurl=http://mirrors.163.com/centos/7/updates/$basearch/

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful

[extras]

name=CentOS-6 - Extras - 163.com

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras

baseurl=http://mirrors.163.com/centos/7/extras/$basearch/

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-6 - Plus - 163.com

baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/

gpgcheck=1

enabled=0

8.清理缓存

yum clean all

yum makecache

9.验证

yum install telnet