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. [转] - C++程序启动过程

    先说编译.链接过程1.预编译展开宏2.为每一个.cxx源文件编译一个目标文件3.编译器合成这些目标文件成一个库文件,同时解析可以找到的符号引用4.连接器把目标的库文件和所需要的引用的静.动态链接库进行 ...

  2. mysql 常用知识

    1.uuid guid UUID是一个由4个连字号(-)将32个字节长的字符串分隔后生成的字符串,总共36个字节长.比如:550e8400-e29b-41d4-a716-446655440000 CH ...

  3. PHP 错误与异常 笔记与总结(5)配置文件中与错误日志相关的选项 && 将错误记录到指定的文件中

    [记录错误(生产环境)] php.ini: ① 开启 / 关闭 错误日志功能 log_errors = On ② 设置 log_errors 的最大字节数 log_errors_max_len = 其 ...

  4. 解决电脑访问Discuz!手机版(支持触屏版)

    discuz电脑访问手机版的方法现在需要来修改一下2个文件,即可用电脑浏览discuz的手机版本:找到./source/function/function_core.php 文件,查找 : funct ...

  5. PHP函数补完 - var_export

    var_export() 函数返回关于传递给该函数的变量的结构信息,它和 var_dump() 类似,不同的是其返回的表示是合法的 PHP 代码.var_export必须返回合法的php代码, 也就是 ...

  6. ThinkPHP 关联模型中查询某条记录的父级(非查询子级)

    数据表 id      cat_name      cat_pid 76     手机.数码     0 84     手机配件        76 86     蓝牙耳机        84 从属关 ...

  7. 20145225 实验四《Andoid开发基础》

    实验内容 搭建Android环境 运行Android 修改代码,能输出学号 实验步骤 安装Android Studio 安装Android的SDK 运行Andriod Studio并在模拟手机上显示自 ...

  8. 微信公众账号开发教程(三) 实例入门:机器人(附源码) ——转自http://www.cnblogs.com/yank/p/3409308.html

    一.功能介绍 通过微信公众平台实现在线客服机器人功能.主要的功能包括:简单对话.查询天气等服务. 这里只是提供比较简单的功能,重在通过此实例来说明公众平台的具体研发过程.只是一个简单DEMO,如果需要 ...

  9. Lazarus中system.length说明

    在system单元中我们有Length专门用来获取字符串宽度和数组宽度,下面例子来介绍他的功能. 定义: function Length(   S: AStringType ):Integer; fu ...

  10. springMVC配置文件spring-servlet.xml中<mvc:annotation-driven />的意义

    <mvc:annotation-driven/>标签,对应的实现类是org.springframework.web.servlet.config.AnnotationDrivenBeanD ...