`

redhat7 配置centos7yum源

 
阅读更多

1.首先删除redhat原有的yum ,因为redhat 原本的yum 没有注册为redhat用户是用不了的。

rpm -aq|grep yum|xargs rpm -e --nodeps 

 


 

2下载163的yum 安装包

 

wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm

 

wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-118.el7.centos.noarch.rpm

 

wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

 

wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-24.el7.noarch.rpm

 


 

3.进行安装yum 

rpm -ivh python-iniparse-0.4-9.el7.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
rpm -ivh yum-3.4.3-118.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-24.el7.noarch.rpm  
注意最后两个包必需同时安装,否则会相互依赖 

 


 

 

 

4.更新repo文件

 

mv /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.repo.bak

 

如果没有这个文件就直接创建

 

sudo nano /etc/yum.repos.d/rhel-debuginfo.repo

 

在文件中写入

 

[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7


#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7


[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos/7/extras//$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.163.com/centos/7/centosplus//$basearch/
gpgcheck=1
enabled=0

 

保存退出

5 yum clean all 

6 yum update 测试。

 

7 安装 epel 源

 

sudo yum install epel-release

 

如果不行就手动下载安装

 

wget https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

 

sudo yum install epel-release-7-5.noarch.rpm

$ sudo yum repolist检查是否安装成功

分享到:
评论

相关推荐

    redhat更改为centOS-6.4 yum源相关安装包

    redhat更改为centOS-6.4 yum源相关安装包

    redhat7使用centos7的yum源

    redhat7使用yum需要收费,不能直接使用,需要使用centos7的yum源,本人看了一些文档和博客总结成了这个方法,成功地为redhat7配置好了yum,这个压缩包中包含配置yum的方法以及用到的文件,需要提前安装python,我的linux安...

    RedHat7安装CentOS7的yum文件.rar

    RedHat7无法使用自带的YUM(要求许可才能使用),可使用CentOS7的YUM进行安装程序。

    redhat6和centos6通用yum源文件.zip

    redhat6和centos6通用阿里云yum源文件,已配置好的文件,下载解压,拷贝到/etc/yum.repos.d/目录,执行yum clean all命令。即可使用yum网络源。

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

    Red Hat Enterprise Linux7的更新包只对注册的用户生效,所以需要自己手动改成Centos的更新包,Centos几乎和和Redhat是一样的,所以无需担心软件包的兼容问题。

    redhat/centos6通用yum源

    通用版redhat6或者centos6的yum源

    Redhat6.4配置Centos6软件源yum

    详细介绍yum软件源的替换,具有安装说明文档和相关的包。如果linux上不了网可以直接使用里面的软件rpm包

    CentOS 7 yum源安装软件包

    # 删除redhat自带的yum包 rpm -qa|grep yum|xargs rpm -e --nodeps # 安装yum软件包 # 注意:单个的安装包可能会依赖其它包(例如yum和yum-fastestmirror会相互依赖),所以我们可以把所有这些包放在一起,用一行...

    RedHat5.1配置yum源

    这是最新的redhat5.1配置centos yum的教程,将redhat的收费yum替换成centos免费yum,里面的软件下载地址是最新的(2014-02-28),大家可以直接wget使用,如果提示不可用可能是格式问题,建议先复制到记事本然后在粘贴...

    RedHat7安装CentOS7 yum的.rpm文件

    yum-3.4.3-132.el7.centos.0.1.noarch.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm yum-updateonboot-1.1.31-34.el7.noarch.rpm yum-utils-1.1.31-34.el7....

    redhat使用centos yum

    亲自解决公司yum问题,特别研究编著.解决redhat在5.0及6.0的yum使用问题。

    RedHat 5.3配置YUM 从centos5源与光盘源更新软件

    RedHat 5.3配置YUM 从centos5源与光盘源更新软件

    redhat7.9 + yum.repos.d

    redhat7.9 + yum.repos.d +CentOS7-Base-163.repo + Centos-7-aliyun.repo

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

    linux redhat centos修改yum下载源.zip

    修改red hat yum 源为centos

    将red hat 7.3或7.4的yum源改为 Centos 的yum源。文件放一起。要root

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

    redhat7替换使用CentOS yum源--博客附件;方便下载,改为1积分,CSDN好像最低就是1积分! 大家别下了,我怕资源失效,文章写好久了

    redhat 7 换 centos 7 yum 源 资源包

    python-2.7.5-34.el7.x86_64.rpm python-chardet-2.2.1-1.el7_1.noarch.rpm python-devel-2.7.5-34.el7.x86_64.rpm python-iniparse-0.4-9.el7.noarch.rpm python-kitchen-1.1.1-5.el7.noarch.rpm ...

    RedHat配置免费网络yum源

    有好多朋友使用linux redhat版本是不是还在为rpm包的安装而烦恼,yum工具的使用无意是解决这一难题的好工具,他...回答是肯定的可以使用,我们可以借助于centos系统开源包来给我们的yum工具做相应配置就可以使用了。

    centos重装yum

    redhat 自带的 yum 源需要注册,花钱才能使用,重装centos7的yum

    RedHat6.6更新Centos6yum源

    redhat未注册,连接redhat官方软件源时,对未注册的用户不提供下载软件包的权限。 解决办法:因为centOS和redhat “本自同根生”,因此可以使用centOS的软件源。包括32位的软件包及安装步骤

Global site tag (gtag.js) - Google Analytics