日期:2011-02-23 18:06:00  来源:本站整理

RedHat Linux RHEL5配置CentOS YUM更新源[服务器安全]

赞助商链接



  本文“RedHat Linux RHEL5配置CentOS YUM更新源[服务器安全]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:

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更新源,www.linuxidc.com这里利用的是上海交大的CentOS更新源

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

[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=0
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=0
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=0
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=0
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=0
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=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
# vi dag.repo
[dag]
name=Dag RPM Repository for RHEL5
baseurl=http://ftp.riken.jp/Linux/dag/RedHat/el5/en/$basearch/dag/
enabled=1
gpgcheck=0
gpgkey=http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt

导入key

[root@linux-a ~]# rpm --import http://ftp.sjtu.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5

运行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


  以上是“RedHat Linux RHEL5配置CentOS YUM更新源[服务器安全]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
  • 办理Redhat服务器猖獗往外发包问题
  • 给阿里云服务器redhat系统插上可视化的翅膀
  • 用虚拟机装RedHat linux系统
  • 办理虚拟机中redhat花屏问题的办法
  • RedHat Linux安装图解
  • <b>红帽RedHat Linux下通过脚本实现双机彼此备份(远程双机互备)</b>
  • <b>RedHat Linux 5 Tomcat 的安装及环境的配置</b>
  • RedHat Linux 5安装PHP SELinux保护
  • RedHat Linux 5 安装 PHP SELinux保护
  • RedHat Linux 9.0下Apache 2.2安装及简单配置
  • <b>RedHat Linux下MySQL数据库配置</b>
  • <b>redhat或centos下用yum安装(卸载)KDE和GNOME</b>
  • 本文地址: 与您的QQ/BBS好友分享!
    • 好的评价 如果您觉得此文章好,就请您
        0%(0)
    • 差的评价 如果您觉得此文章差,就请您
        0%(0)

    文章评论评论内容只代表网友观点,与本站立场无关!

       评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论
    Copyright © 2020-2022 www.xiamiku.com. All Rights Reserved .