RHEL系列是使用最广的Linux服务器系统之一,但是对于未付费用户,却无法通过Redhat网络安装和更新软件,这不能不说是一个遗憾。其实
我们完全可以通过RHEL的同胞兄弟CentOS的源来更新,步骤如下:
1、在 /etc/yum.repos.d/ 目录下新建一个文件 CentOS-Base.repo
#vi CentOS-Base.repo
2、在该文件中录入以下内容并保存(本例的源在撰写本文时是有效的):
[base]
name=CentOS-5 – Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&
repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/5/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#released updates
[update]
name=CentOS-5 – Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#packages used/produced in the build but not released
[addons]
name=CentOS-5 – Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons
baseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that may be useful
[extras]
name=CentOS-5 – Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras
baseurl=http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 – Plus
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
baseurl=http://ftp.sjtu.edu.cn/centos/5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#contrib – packages by Centos Users
[contrib]
name=CentOS-5 – Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/5/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
3、执行更新:
# yum update
======================================
另外,如果服务器需要通过代理上网,则需要设置一下代理服务器才能进行联网更新:
在 /etc/yum.conf文件加入下面一行内容,指定一下代理服务器参数:
#Set http proxy
proxy=http://192.168.1.100:8000
分享到:
相关推荐
Redhat Enterprise Linux 5.3下安装Oracle10g Release2中用到的RPM文件
RedHat 5.3配置YUM 从centos5源与光盘源更新软件
NULL 博文链接:https://wisdombrave.iteye.com/blog/543533
linux redhat yum 上海交大的CentOS更新源
Redhat enterprise 5.3 上ORACLE 安装
RedHat EnterPrise linux 高可用集群技术
RedHat_5.3配置YUM_从centos5源与光盘源更新软件
我觉的可以redhat enterprise linux分类
Redhat Enterprise linux5学习笔记,整套资料
Redhat Enterprise Linux Advanced Server 4安装oracle11g
RedHat Enterprise Linux之raid5磁盘阵列
RedHat Enterprise Linux Advanced server v3 安装 Oracle --MSN:zhoujianguo_leo@hotmail.com
RedHat Linux RHEL6配置本地YUM源
RedHat Linux 5.3安装 Oracle 11g中文文档总结
RedHat3配置YUM从centos5源与光盘源更新软件.pdf
Mastering RedHat Enterprise Linux 3 Mastering RedHat Enterprise Linux 3
RedHat Enterprise Linux 7_x64 百度网盘下载链接
这是学习redhat enterprise linux 非常好的资料,值得拥有!!
redhat enterprise Linux cluster suites 配置
Redhat.Enterprise.Linux.v6.iso镜像,可部署虚拟机一起