RedHat6.6更新Centos6yum源

一、    删除自带的RedHat6.6yum源

1-       rpm -qa|grep yum|xargs rpm -e --nodeps(不检查依赖,直接删除rpm包)

2-       检查是否删除干净

rpm –qa|grep yum

3-       下载新yum源

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-73.el6.centos.noarch.rpm

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm

4-       一起安装避免依赖。

rpm –ivh *.rpm

5-       更新yum源。使用163的源。

vi Centos.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

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

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

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#released updates

[updates]

name=CentOS-6 - Updates - 163.com

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

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

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful

[extras]

name=CentOS-6 - Extras - 163.com

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

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

gpgcheck=1

gpgkey=http://mirror.centos.org/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/6/centosplus/$basearch/

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

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users

[contrib]

name=CentOS-6 - Contrib - 163.com

baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/

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

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

6-       清除原有缓存

#yum  clean all

7-       重建缓存,以提高搜索安装软件的速度

#yum makecache

8-       更新系统

#yum –y update

RedHat6.6更新Centos6yum源的更多相关文章

  1. RedHat6.5更新软件源

    今天在Red Hat上安装软件时,发现需要依赖软件,然而在用sudo yum指令时,出现了下面的错误: This system is not registered to Red Hat Subscri ...

  2. CentOS更新yum源

    CentOS更新yum源 1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2.下载 ...

  3. ubuntu 更新软件源

    ubuntu 更新软件源 修改文件sources.list 位于/etc/apt/sources.list,并备份原文件为sources.list.bak deb http://mirrors.163 ...

  4. kali linux 更新软件源,安装中文输入法,修复Linux与windows引导菜单解决windows引导丢失

    1. 更新软件源打开sources.list文件,进行添加更新源:leafpad /etc/apt/sources.list 2. 添加软件源#官方源 deb http://http.kali.org ...

  5. RedHat 7.3 更新yum源

    title: RedHat 7.3 更新yum源 time: 2018.3.15 查看所有yum包 [root@bogon ~]# rpm -qa | grep yum yum-rhn-plugin- ...

  6. redhat 7.2更新yum源时踩的坑

    一.update yum .先查看redhat7.2中yum的包版本 [root@localhost jiayimeng]# rpm -qa | grep yum -.el7.noarch -.el7 ...

  7. 更新yum源却忘了生成缓存 造成每次启动机器报:the package list needs to be rebuilt

    更新yum源的后一定要执行下面的两条命令: yum clean all yum makecache  注意:如果有第三方源的时候是,开机发果不联网的时候,也会报这个错!!!!!

  8. Debian更新软件源提示There is no public key available for the following key IDs的解决方法

    今天装了的debian7.0 但是更新软件源的时候出错 提示 W: There is no public key available for the following key IDs: 9D6D8F ...

  9. CentOS7 宝塔搭配git 实时更新项目源码

    上一篇文章 介绍了如何在CentOS7上 搭建GIT环境 详见链接:https://www.cnblogs.com/mverting/p/10206532.html 本章主要介绍git如何和wdcp搭 ...

随机推荐

  1. php代码审计基础笔记

    出处: 九零SEC连接:http://forum.90sec.org/forum.php?mod=viewthread&tid=8059 --------------------------- ...

  2. in_array 的第三个参数strict设置为 true

    var_dump(in_array(0, array('s' )); 这句话的结果是bool(true). 因为in_array会将0 和's' 进行比较,0是number类型,'s'是string类 ...

  3. 基本Java数据类型

    一.整型:java中的基本数据类型byte,占用1个字节,8位   取值范围:0000 0000 ~ 1111 1111 (-128 ~ 127)   为什么不是:0000 0000 ~ 1111 1 ...

  4. 自定义view实现侧滑菜单

    自定义View public class SlidingMenu extends HorizontalScrollView { private int mScreenWidth; private in ...

  5. [分享]运维分享一一阿里云linux系统mysql密码修改脚本

    [分享]运维分享一一阿里云linux系统mysql密码修改脚本       大象吃豆子 级别: 小白 发帖 12 云币 27 加关注 写私信   只看楼主 更多操作楼主  发表于: 2014-09-3 ...

  6. [源码]随机获取虾米音乐song_id API文件

    [源码]随机获取虾米音乐song_id API文件 January 11, 2015 注意:此API请放置于国内主机使用,如香港.北京等等,否则会提示:虾米音乐在您所处的国家或地区暂时无法使用 < ...

  7. Rails--content_for和yield

    --使用: (1)layout中使用<%=yield(:js)%> (2)html中使用<% content_for :js do %>[XXX]<% end %>

  8. 20145235《Java程序设计》课程总结

    每周读书笔记链接汇总 20145235<Java程序设计>第1周学习总结 20145235<Java程序设计>第2周学习总结 20145235<Java程序设计>第 ...

  9. JS初学者必备的几个经典案例(一)!!!

    一:选中复选框按钮可用    和     倒计时10秒后按钮可用 这是倒计时10秒后按钮可用 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...

  10. Demonstrating One-Shot Execution TimerTask Timer

    Listing -. Demonstrating One-Shot Execution import java.util.Timer; import java.util.TimerTask; publ ...