Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1526932
  • 博文数量: 329
  • 博客积分: 2773
  • 博客等级: 少校
  • 技术积分: 4219
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-24 14:17
个人简介

淡定从容,宁静致远

文章分类

全部博文(329)

文章存档

2016年(4)

2015年(50)

2014年(68)

2013年(45)

2012年(162)

分类: LINUX

2014-11-16 20:14:54

原文地址:redhat yum源安装与配置 作者:chinahhucai

YUM是Redhat Linux在线安装更新及软件的工具,但是这是RHEL5的收费功能,如果没有购买Redhat的服务时不能使用RHEL5的更新源的,会提示注册。

由于CentOS是从Redhat演化而来的免费Linux版本,因此可以利用CentOS的yum更新源来实现RHEL5的YUM功能。配置方法如下:

检查yum是否安装,默认情况下都是安装好的,总共4各包。

[root@linux-a ~]# rpm -qa |grep yum
yum-metadata-parser-1.0-8.fc6
yum-3.0.1-5.el5
yum-rhn-plugin-0.4.3-1.el5
yum-updatesd-3.0.1-5.el5

配置yum更新源

创建/etc/yum.repos.d/CentOS-Base.repo文件,定义yum更新源,这里使用的是上海交大的CentOS更新源

[root@linux-a ~]# vi /etc/yum.repos.d/CentOS-Base.repo

[base]
name=CentOS-5-Base
#mirrorlist=
#baseurl=
baseurl=
gpgcheck=0
gpgkey=
#released updates
[update]
name=CentOS-5-Updates
#mirrorlist=
baseurl=
gpgcheck=0
gpgkey=
#packages used/produced in the build but not released
[addons]
name=CentOS-5-Addons
#mirrorlist=
baseurl=
gpgcheck=0
gpgkey=
#additional packages that may be useful
[extras]
name=CentOS-5-Extras
#mirrorlist=
baseurl=
gpgcheck=0
gpgkey=
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5-Plus
#mirrorlist=
baseurl=
gpgcheck=0
enabled=0
gpgkey=
#contrib - packages by Centos Users
[contrib]
name=CentOS-5-Contrib
#mirrorlist=
baseurl=
gpgcheck=0
enabled=0
gpgkey=
# vi dag.repo
[dag]
name=Dag RPM Repository for RHEL5
baseurl=
enabled=1
gpgcheck=0
gpgkey=

导入key

[root@linux-a ~]# rpm --import 

运行YUM,测试

[root@linux-a ~]# yum install xmms-mp3
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package xmms-mp3.i386 1:1.2.10-16.el5.rf set to be updated
--> Running transaction check
--> Processing Dependency: libglib-1.2.so.0 for package: xmms-mp3
--> Processing Dependency: libgdk-1.2.so.0 for package: xmms-mp3
--> Processing Dependency: libgthread-1.2.so.0 for package: xmms-mp3
--> Processing Dependency: libgmodule-1.2.so.0 for package: xmms-mp3
--> Processing Dependency: libgtk-1.2.so.0 for package: xmms-mp3
--> Processing Dependency: libxmms.so.1 for package: xmms-mp3
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package xmms.i386 1:1.2.10-14.el5.rf set to be updated
---> Package glib.i386 1:1.2.10-20.el5 set to be updated
---> Downloading header for gtk+ to pack into transaction set.
gtk+-1.2.10-56.el5.i386.r 100% |=========================|  25 kB    00:00     
---> Package gtk+.i386 1:1.2.10-56.el5 set to be updated
--> Running transaction check
--> Processing Dependency: libmikmod.so.2 for package: xmms
--> Processing Dependency: gdk-pixbuf >= 0.18.0 for package: gtk+
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for gdk-pixbuf to pack into transaction set.
gdk-pixbuf-0.22.0-25.el5. 100% |=========================|  16 kB    00:00     
---> Package gdk-pixbuf.i386 1:0.22.0-25.el5 set to be updated
---> Downloading header for mikmod to pack into transaction set.
mikmod-3.1.6-38.1.i386.rp 100% |=========================| 7.7 kB    00:00     
---> Package mikmod.i386 0:3.1.6-38.1 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 xmms-mp3                i386       1:1.2.10-16.el5.rf  dag               179 k
Installing for dependencies:
 gdk-pixbuf              i386       1:0.22.0-25.el5  base              231 k
 glib                    i386       1:1.2.10-20.el5  base              137 k
 gtk+                    i386       1:1.2.10-56.el5  base              923 k
 mikmod                  i386       3.1.6-38.1       base              201 k
 xmms                    i386       1:1.2.10-14.el5.rf  dag               2.3 M

Transaction Summary
=============================================================================
Install      6 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)        

Total download size: 3.9 M
Is this ok [y/N]:


本文转自:
阅读(1152) | 评论(0) | 转发(0) |
0

上一篇:C#窗体最大化和最小化

下一篇:C# 捕捉tab

给主人留下些什么吧!~~