Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1420580
  • 博文数量: 185
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 2664
  • 用 户 组: 普通用户
  • 注册时间: 2016-07-01 13:46
个人简介

鸟在笼中,恨关羽不能张飞;Survival of the fittest

文章分类

全部博文(185)

分类: LINUX

2012-05-16 10:53:13

     大家都知道rhel想要跟新软件都是要注册的,对于平民百姓来说那费用还是有点高的。呵呵,看了网上的资料写的都是杂乱无章的,今天刚好有时间,整理下我的redhat as5.X 的yum配置,希望对大家有所帮助

 
配置rhel 5 使用CentOS的yum站点升级
删除原来的/etc/yum.conf文件和/etc/yum.repo.d目录
rm -rf /etc/yum.conf
cd /etc/yum.repos.d/
rm -rf rhel-debuginfo.repo
vi /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
[base]
name=centos-5 - Base
baseurl=
# the other site:
# you can find more site in:
enabled=1
gpgcheck=1
gpgkey=RPM-GPG-KEY-CentOS-5
#released updates
[update]
name=CentOS-5 - Updates
baseurl=
gpgcheck=1
gpgkey=RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
baseurl=
gpgcheck=1
gpgkey=RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
baseurl=
gpgcheck=1
gpgkey=
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
baseurl=
gpgcheck=1
enabled=0
gpgkey=RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
baseurl=
gpgcheck=1
enabled=0
gpgkey=RPM-GPG-KEY-CentOS-5
#packages in testing
[testing]
name=CentOS-5 - Testing
baseurl=
gpgcheck=1
enabled=0
gpgkey=RPM-GPG-KEY-CentOS-5
 
到此就ok了 ,是不是很方便!!!,这个是中科大的源,号称每隔小时跟新一次,速度确实蛮快
 
测试下
yum -y install system-config-date
 
出现错误修复
修复此错误,请在以root身份在终端输入以下命令:
rm -f /var/lib/rpm/__db.*
rpm --rebuilddb
yum clean all
阅读(1874) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~