文档详情

redhat centos yum源 redhat6.6配置使用centos的yum源.doc

发布:2017-01-10约9.53千字共37页下载文档
文本预览下载声明
redhat centos yum源 redhat6.6配置使用centos的yum源 导读:就爱阅读网友为您分享以下“redhat6.6配置使用centos的yum源”资讯,希望对您有所帮助,感谢您对92的支持! redhat6.6配置使用centos的yum源 redhat 默认自带的 yum 源需要注册,才能更新。我们想不花钱也可以更新,需要替换掉redhat的yum源,具体的实现方式如下: 1、检查是否安装yum包 查看RHEL是否安装了yum,若是安装了,那么又有哪些yum包: [root@localhost ~]# 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 2、删除redhat自带的yum包 卸载上面显示的所有yum包: [root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps(不检查依赖,直接删除rpm包) 再用 [root@localhost ~]# rpm -qa |grep yum [root@localhost ~]# 查看,无信息显示表示已经卸载完成。 3、下载新的yum包。使用Centos6.5的yum包 # wget /centos/6.6/os/i386/Packages/yum-metadata-parser-1.1.2-16.el6.i686.rpm # wget /centos/6.6/os/i386/Packages/yum-3.2.29-60.el6.centos.noarch.rpm # wget /centos/6.6/os/i386/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm 4、安装yum软件包 注意:单个的安装包可能会依赖其它包(例如yum和yum-fastestmirror会相互依赖),所以我们可以把所有这些包放在一起,用一行命令将它们同时安装即可: rpm –ivh yum-metadata-parser-1.1.2-16.el6.i686.rpm yum-3.2.29-60.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm 5、更新yum源 在/etc/yum.repos.d/目录下去除原有的*.repo文件,新建一个新的Base.repo文件,该文件的内容如下: (注意,文件中相应的baseurl需要确保路径正确,所以有必要检查实际的ftp镜像路劲是否存在) # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-6.5 - Base - 163.com baseurl=/centos/6/os/$basearch/ #mirrorlist=/?release=6.5arch=$basearchrepo=os gpgcheck=1 gpgkey=/centos/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-6.5 - Updates - 163.com baseurl=/centos/6/updates/$basearch/ #mirrorlist=/?release=6.5arch=$basearchrepo=updates gpgcheck=1 gpgkey=/centos/RPM-GPG-KEY-CentOS-6 #additional packages that
显示全部
相似文档