Centos5.11 使用yum源
由于我是用的系统是Centos 5.11以停止更新很多年,故此yum也不能用,找了很多方法,最终yum能稳定的运行在Centos5.11上,下面开始一一讲解步骤:
1:首先更新yum源
地址:http://vault.centos.org/
网站是有各个版本镜像的,所以 通过lsb_release -a查询下,系统版本如图
下面是我的yum源完整版本,下面会说出具体针对系统版本进行修改yum源方法:
vim /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-$releasever - Base
baseurl=http://vault.centos.org/5.11/os/x86_64/
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/5.11/os/x86_64/
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://vault.centos.org/5.11/os/x86_64/
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://vault.centos.org/5.11/os/x86_64/
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://vault.centos.org/5.11/os/x86_64/
gpgcheck=
enabled=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
baseurl=http://vault.centos.org/5.11/os/x86_64/
gpgcheck=
enabled=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
注:如果你的版本是5.10(举例说明),打开此网站,http://vault.centos.org,根据上述地址http://vault.centos.org/5.11/os/x86_64/来进行修改,比如系统是5.10的话,是x86_64的,我们可以修改成http://vault.centos.org/5.10/os/x86_64/,修改完成后,浏览器打开输入地址,看看是不是可以显示出以下页面:
如果显示出上述页面,那根据我上面的5.11版本的Centos源把baseurl=http://vault.centos.org/5.11/os/x86_64/ 修改成 baseurl=http://vault.centos.org/5.10/os/x86_64/(是上述文件内容中,所有http://vault.centos.org/5.11/os/x86_64/地址),即可
修改完成后,保存,使用如下命令进行测试
yum clean all
yum makecache
测试成功后,可用yum进行安装、卸载软件
Centos5.11 使用yum源的更多相关文章
- centos6.4搭建基于ftp的yum源让本地局域网服务器使用
1. 挂载centos6.4 DVD镜像[root@centos64 ~]# mount /dev/cdrom /mnt 2. 安装vsftp软件,启动vsftpd服务,拷贝centos6.4 DVD ...
- 阿里云centos5升级yum源为6
升级后出现Errno -3] Error performing checksum 需要安装 python-hashlib Python 2.4 安装 hashlib 2012年11月13日 14:29 ...
- CentOS-5的yum源无法使用问题
CentOS-5的yum源无法使用问题 [root@37wan ~]# yum -y install gcc Loaded plugins: fastestmirror Determining fas ...
- CentOS修改各大yum源(centos5,centos6,centos7)
备份原配置文件 进入yum源配置目录: cd /etc/yum.repos.d 如果没有先安装wget: sudo yum install wget 修改yum源,就是修改CentOS-Base.re ...
- 建立自己的Yum源
转自http://kicklinux.com/setup-yum-repos-server/ 命令 reposync 可以直接同步yum源 如/etc/yum.repos.d/cloudera-cdh ...
- CentOS下建立本地YUM源并自动更新
1. 尽管有很多的免费镜像提供yum源服务,但是还是有必要建立自己的yum服务器,主要出于以下几点考虑: l 网络速度:访问互联网可能比较慢 l 节省带宽:如果有大量的服务器,架设自己的yum源可以有 ...
- redhat7 配置使用centos的yum源
新安装了redhat7.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription Man ...
- 利用阿里云提供的镜像快速更换本地的yum源
打开网页:http://mirrors.aliyun.com/ 从“ 文件列表 ”找到自己的系统: Mirror Last update Help CPAN 2015-07-15 15:36:50 ...
- 配置yum源方法,以及失效时的处理
正常方法如下: step1: 备份原CentOS-Base.repo 文件 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-B ...
随机推荐
- windows server安装oracle
倒腾windows server的时候一定要先整net framework然后再安装oracle不然连不上或者装一下client 也能连上但是为了不安装client一定要先装framework!
- appium()-java-client-api
//appium java-client-api 介绍 原文地址:http://appium.github.io/java-client/index-all.html#_S_ A B C D E F ...
- c++中class与struct的区别
0. 结构是一种用关键字struct声明的自定义数据类型.与类相似,也可以包含构造函数,常数,字段,方法,属性,索引器,运算符和嵌套类型. 1.结构在堆栈中创建,是值类型,而类是引用类型.每当需要一种 ...
- MysqlNDB集群配置与管理
为了避免不必要的资源分配,默认情况下是不启动ndbcluster引擎. 在管理节点,配置config.ini,注意请将空的[MYSQLD]的数量>2倍的sql节点数 当config.ini发生变 ...
- angularjs ng-repeat倒叙
<div ng-app="myApp" ng-controller="customersCtrl"> <table> <tr ng ...
- jquery回顾part1——选择器
jQuery 选择器 选择器 实例 选取 * $("*") 所有元素 #id $("#lastname") id="lastname" 的元 ...
- linux应用之mysql数据库指定版本的yum安装(centos)
A Quick Guide to Using the MySQL Yum Repository Abstract The MySQL Yum repository provides RPM packa ...
- 【错误信息】springMVC No mapping found for HTTP request with URI
出现这个问题的原因是在web.xml中配置错了:
- 为什么要把页面放在 WEB-INF 路径下?
1.基于不同的功能 JSP 被放置在不同的目录下 这种方法的问题是这些页面文件容易被偷看到源代码,或被直接调用.某些场合下这可能不是个大问题,可是在特定情形中却可能构成安全隐患.用户可以绕过Strut ...
- 开发自己的composer包
1. 创建一个开发目录 mkdir project cd project 2. 利用composer生成一个composer.json composer init > Welcome to th ...