博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CentOS4 可用镜像及更新方式
阅读量:6236 次
发布时间:2019-06-22

本文共 3257 字,大约阅读时间需要 10 分钟。

由于非得使用4.7的版本,所以找了一大圈,终于发现了一个能用的源:

更新方法如下:

vi /etc/yum.repos.d/CentOS-Base.repo

内容如下:

[base]

name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/os/$basearch/
gpgcheck=1
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
priority=1
protect=1

#released updates

[update]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
priority=1
protect=1

#packages used/produced in the build but not released

[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/addons/$basearch/
gpgcheck=1
gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
priority=1
protect=1

#additional packages that may be useful

[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
priority=1
protect=1

#additional packages that extend functionality of existing packages

[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
priority=2
protect=1

#contrib - packages by Centos Users

[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
priority=2
protect=1

 

接下来,导入key

rpm --import
yum upgrade
[root@localhost yum.repos.d]# yum upgrade
base                               100% |=========================| 1.1 kB    00:00    
primary.xml.gz            100% |=========================| 856 kB    00:07    
base      : ################################################## 2458/2458
updates                         100% |=========================| 951 B    00:00    
primary.xml.gz            100% |=========================| 129 kB    00:02    
updates   : ################################################## 324/324
addons                           100% |=========================| 951 B    00:00    
primary.xml.gz            100% |=========================| 157 B    00:00    
extras                           100% |=========================| 1.1 kB    00:00    
primary.xml.gz            100% |=========================| 74 kB    00:02    
extras    : ################################################## 244/244
yum update

OK,到此为止,大功告成!!!!!!!!

转载于:https://www.cnblogs.com/cosiray/archive/2012/05/19/2508735.html

你可能感兴趣的文章
网络爬虫基础知识(Python实现)
查看>>
前端学HTTP之Web主机托管
查看>>
深入理解line-height与vertical-align
查看>>
Bogon
查看>>
[开源]KJFramework.Message 高性能二进制消息框架 - 非托管优化
查看>>
HTML css样式
查看>>
实验二
查看>>
博客200随笔纪念
查看>>
SpringMVC使用POST方法传递数据,却出现Request method 'GET' not supported?
查看>>
JS实现系统时间(自动)
查看>>
tomcat启动项目 端口占用
查看>>
Maven将jar包放入本地库
查看>>
价值观的选择
查看>>
如何配置 SQL Server 2005 以允许远程连接
查看>>
Objective-C 生成器模式 -- 简单实用和说明
查看>>
curl如何发起DELETE/PUT请求
查看>>
【多线程】的简单理解&进程 and【你的电脑是几核的?】
查看>>
JSP_乱码原理
查看>>
Python--day41--线程队列
查看>>
Code First 中 Fluent API 的作用
查看>>