RedHat Linux企业版免费发布,但技术支持和更新是需要收服务费的,如果我们的RHEL没注册到RHN,那就没法通过yum下载更新软件包。CentOS是使用RHEL公布的源代码重新编译的Linux发行版,大部分情况下CentOS的软件包和RHEL完全一致,因此我们可以放心的让yum指向CentOS的源下载和更新软件包。国内CentOS的镜像中,163对于普通互联网用户来说,下载速度相当快,因此这里采用163的CentOS作为更新源。
进入yum源配置目录(/etc/yum.repos.d),运行如下命令下载更新源文件
wget http://mirrors.163.com/.help/CentOS-Base-163.repo
此更新源文件是为CentOS准备的,和RHEL的不完全相同,要把文件里的版本强制改为5
vi CentOS-Base-163.repo, 然后用命令“:1,$s/$releasever/5/g”将$releasever全部替换为5
运行如下命令:
rpm --import http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5
经过这简单的几步,yum已经可以正常工作了
- [root@localhost yum.repos.d]# yum search mysql
- Loaded plugins: rhnplugin, security
- This system is not registered with RHN.
- RHN support will be disabled.
- addons | 951 B 00:00
- addons/primary | 202 B 00:00
- base | 1.1 kB 00:00
- base/primary | 961 kB 00:00
- base 2705/2705
- extras | 2.1 kB 00:00
- extras/primary_db | 171 kB 00:00
- updates | 1.9 kB 00:00
- updates/primary_db | 357 kB 00:00
- Excluding Packages in global exclude list
- Finished
- ================================ Matched: mysql ================================
- .
- .
- .
更多RedHat相关信息见RedHat 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=10Vim 用户手册阅读导览Xubuntu 11.10下装Sublime Text相关资讯 RHEL
- Red Hat Enterprise Linux 7.2 发 (11/20/2015 13:39:31)
- 使用Windows 2003 Server R2给RHEL (01/03/2015 09:14:16)
- Red Hat Enterprise Linux 5.11 发 (09/17/2014 09:40:49)
| - 在VMware中安装RHEL6.2(下)—— (01/07/2015 12:24:47)
- 红帽企业 Linux (RHEL) 7.1 Beta (12/12/2014 09:44:13)
- Red Hat Enterprise Linux 6.6 (08/13/2014 13:43:14)
|
本文评论 查看全部评论 (0)