自定义CentOS的yum升级源站点
来源:互联网 发布:java动物乐园代码 编辑:程序博客网 时间:2024/05/23 01:58
1、yum升级配置文件名: /etc/yum.repos.d/CentOS-Base.repo
2、编辑上述文件,把这个配置文件每个节所有以mirrorlist打头的设置全部用#注释掉
3、把原来baseurl打头用#注释掉的设置全打开(去掉#号)
4、查找替换"mirror.centos.org"为你想要的任何网站,我用的是上海交通大学的升级网站"ftp.sjtu.edu.cn"
5、经我改变的CENT OS 5.3的yum 升级配置文件如下:
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# 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
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck=1
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
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#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://ftp.sjtu.edu.cn/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
6、补充说明1:配置文件最上面的一段英文的意思是说现在CentOS用了最新的升级机制,可以利用镜像站点列表为你找到最近的升级站点,也就是以mirrorlist开头的那些设置;但实际情况是我们可以利用baseurl这个设置直接指定你想要升级的站点。
7、补充说明2:配置文件中那些以$打头的字符串其实是变量,不需要像有些网上文章说的那样改成5、5.1或5.3什么的,也不用管是32位,还是64位的,这些变量和你的系统会自动匹配,所以直接查找替换掉服务器地址就可以了。
- 自定义CentOS的yum升级源站点
- centos升级yum源
- 配置rhel 5 或6使用CentOS的yum站点升级
- centos升级python,以及yum的修复
- CentOS系统的YUM在线升级机制
- centos yum升级php
- CentOS yum升级内核
- centos yum升级git
- centos 5.5 yum 升级 php
- centos 旧版yum升级Php5
- centos下yum升级内核
- centos 下yum 升级PHP
- php yum升级 centos 6.5
- CentOS 5.5 下的 YUM、软件包下载源及 AMP 升级
- Redhat 使用CentOS的yum源进行升级或软件安装
- Redhat 使用CentOS的yum源进行升级或软件安装
- Redhat 使用CentOS的yum源进行升级或软件安装
- Redhat 使用CentOS的yum源进行升级或软件安装
- 接收灵敏度
- GData协议基础知识
- 什么是OTA测试
- DevCon 命令行实用工具可替代设备管理器
- Qt的模态对话框和非模态对话框
- 自定义CentOS的yum升级源站点
- Sql Server2000 密码找回(转载)
- 小心使用IOCP完成端口
- 单片机学习笔记090710(2)
- c#参数修饰符ref、out、params
- 不安装.net framework框架运行.Net 程序的方法
- 硬盘分区表简介
- SilverLight3正式版(含Eclipse4SL)安装手记(downmoon
- 2008年03月20日(1月末-2月过年没写)