`
lanux
  • 浏览: 3241 次
  • 性别: Icon_minigender_1
  • 来自: 广州
最近访客 更多访客>>
社区版块
存档分类
最新评论

redhat替换centOS yum

阅读更多
1. 删除原有的yum源
# rpm -aq | grep yum|xargs rpm -e --nodeps 
 
 
2.下载新的yum安装包,这里使用centos-6.5
# wget http://mirror.centos.org/centos/6.5/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
# wget http://mirror.centos.org/centos/6.5/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
# wget http://mirror.centos.org/centos/6.5/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
# wget http://mirror.centos.org/centos/6.5/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm 

 

 
3.安装yum软件包
# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
# rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
# rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm 

 

 
4. 更改yum源
在/etc/yum.repos.d/新建文件centos.repo,内容如下:
# CentOS-Base.repo ###################begin#################################
#
# 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
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/6.5/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6.5 – Updates
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=updates
baseurl=http://mirror.centos.org/centos/6.5/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6.5 – Extras
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=extras
baseurl=http://mirror.centos.org/centos/6.5/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.5 – Plus
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=centosplus
baseurl=http://mirror.centos.org/centos/6.5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#contrib – packages by Centos Users
[contrib]
name=CentOS-6.5 – Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=contrib
baseurl=http://mirror.centos.org/centos/6.5/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
##########################end######################################## 

 

 
注意:
1.   6.5为版本(可替换);
2.   如果RPM-GPG-KEY-CentOS-6不存在则新建,下载地址:http://mirror.centos.org/centos/6.5/os/x86_64/RPM-GPG-KEY-CentOS-6
 
5.清理yum缓存
# yum clean all
# yum makecache #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度
# yum install lrzsz #测试新源是否可用 

 

0
0
分享到:
评论

相关推荐

    redhat/centos6通用yum源

    通用版redhat6或者centos6的yum源

    redhat7配置成centos yum安装包和yum源

    - **替换或添加配置**:将下载的 `.repo` 文件复制到 `/etc/yum.repos.d/` 目录下,替换或添加原有的RHEL源文件。 - **更新缓存**:运行 `yum clean all` 清除原有缓存,然后执行 `yum makecache` 创建新的软件包...

    redhat换centos的yum源所需的4个文件

    - **下载新源文件**:下载到的压缩包"redhat换centos的yum源"应该包含了适用于RHEL 6的CentOS YUM源配置文件。 - **解压并替换文件**:将压缩包解压,并将解压出的`.repo`文件复制到`/etc/yum.repos.d`目录下,...

    Redhat-配置YUM源

    Redhat 配置 YUM 源 Redhat 配置 YUM 源是 Linux 操作系统中的一种软件包管理器配置方法。YUM(Yellow dog Updater, Modified)是一种在 Fedora 和 Red Hat Enterprise Linux 中使用的软件包管理器,能够自动下载和...

    redhat7.9 + yum.repos.d

    总的来说,`redhat7.9 + yum.repos.d` 和相关的`.repo`文件是RHEL 7.9系统管理和维护的重要组成部分。正确配置这些仓库可以帮助用户更高效地管理他们的系统,获取最新的安全更新,以及安装所需的软件包。

    RedHat7修改Yum源.pdf

    RedHat7修改Yum源 RedHat 7 操作系统中,Yum 源是非常重要的组件之一。Yum 源提供了软件包的下载和安装功能,但是在某些情况下,可能需要修改 Yum 源来解决问题或提高下载速度。阿里云镜像站是一个非常流行的镜像...

    Redhat7 安装 yum 亲测 图解 这是安装全量包 包括 CentOS-Base.repo配置文件

    Redhat7 安装 yum 亲测 图解 这是安装全量包 包括 CentOS-Base.repo配置文件 亲测博客地址:http://blog.csdn.net/qq_34256348/article/details/78837175

    将redhat的yum换成centos的yum

    mv /etc/yum.repos.d/redhat.repo /etc/yum.repos.d/redhat.repo.bak ``` 2. **下载CentOS的YUM配置**: 可以通过wget或curl命令从CentOS的官方镜像站点下载相应的配置文件,比如: ``` wget ...

    redhat7替换使用CentOS yum源--博客附件

    总的来说,这个博客附件提供的是一套完整的流程,包括了替换RHEL 7的yum源以及更新必要的yum相关组件,确保用户能够在使用CentOS源后顺利进行软件的安装与更新。需要注意的是,这种操作可能会导致失去RHEL官方的技术...

    RedHat6.4收费yum改CentOS免费yum.zip

    RedHat Enterprise Linux 6.4使用yum安装出现This system is not registered to Red Hat Subscription Management问题,但是发现激活Redhat的yum功能需要收费,所以就更改为CentOS的yum包了。 综合多份文档,本人...

    RedHat5.1配置yum源

    由于 Red Hat 的官方 Yum 源是收费的,为了节省成本,我们可以将其替换为 CentOS 的免费 Yum 源。以下是详细的配置步骤: 1. **卸载 RHEL 默认的 Yum 包** 在开始之前,我们需要先卸载 Red Hat 提供的默认 Yum 包...

    redhat7-yum-rpm完整包.rar

    这个"redhat7-yum-rpm完整包.rar"是为RHEL 7或CentOS 7设计的一个离线安装包集合,它包含了通过YUM(Yellowdog Updater, Modified)进行软件管理所需的所有RPM(Red Hat Package Manager)包。RPM是一种用于安装、...

    redhat/centos 创建yum本地源所需安装rpm包以及说明文档

    3. **配置yum源**:接下来,你需要编辑`/etc/yum.repos.d/local.repo`文件(如果不存在,需要创建),添加以下内容,其中`/path/to/your/repo/directory`应替换为你的实际仓库路径: ``` [localrepo] name=Local...

    linux redhat centos修改yum下载源.zip_redhat yum源

    在Linux操作系统中,尤其是Red Hat Enterprise Linux (RHEL)及其衍生版如CentOS,`yum`是用于管理和安装软件包的重要工具。然而,默认的yum源可能位于国外,导致下载速度较慢,影响了系统的更新和维护效率。因此,将...

    Redhat 使用CentOS的yum源进行升级或软件安装

    Redhat默认的源不但速度不给力,而且软件版本陈旧,今天试着将Redhat默认源替换为CentOS的163源,发现速度能达到2M/s左右,而且版本都比较新,非常给力,与大家分享! (目前可以使用CentOS0-6.3软件仓库的软件) ...

    redhat重装yum

    这个压缩包里有4个文件用来重装redhat的yum,解决虚拟机安装redhatyum不能用的问题,4个文件分别为python-iniparse-0.3.1-2.1.el6.noarch,yum-3.2.29-40.el6.centos.noarch,yum-metadata-parser-1.1.2-16.el6.x86_...

    redhat7安装yum

    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup ``` - 下载阿里云提供的 CentOS 7 的 YUM 源文件: ```shell wget -O /etc/yum.repos.d/CentOS-Base.repo ...

    RedHat未注册yum不能用解决办法

    接下来,需要安装CentOS版本的`yum`包,以确保系统可以正常使用`yum`功能。这里提供32位和64位两种架构下的软件包下载地址及具体的包名。 - **32位软件包下载地址**: ``` ...

    RedHat使用CentOS的yum源方法

    updatesd-0.9-2.el5.noarch.rpm`、`yum-3.2.22-26.el5.centos.noarch.rpm`、`yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm`和`yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm`是与YUM相关的软件包,它们...

Global site tag (gtag.js) - Google Analytics