RHCE7.0 rpm 安装yum

RHCE7.0版本

1. [root@linuxprobe ~]#rpm -qa | grep yum

查看本机yum安装情况

2.[root@linuxprobe ~]#rpm -qa | grep yum | xargs -e --nodeps

删除本机yum配置

3.[root@linuxprobe ~]#rpm -qa | grep yum

继续查看本机yum的安装情况

4.登录网站

http://mirrors.163.com/centos/7/os/x86_64/Packages/

下载

[root@linuxprobe ~]#wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-161.el7.centos.noarch.rpm

[root@linuxprobe ~]#wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

[root@linuxprobe ~]#wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm

[root@linuxprobe ~]#wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-50.el7.noarch.rpm

http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-50.el7.noarch.rpm

使用

[root@linuxprobe ~]#rpm -ivh yum-* --force --nodeps

进行安装

安装完成后

进入

[root@linuxprobe ~]#cd /etc/yum.repos.d/

创建yum文件

[root@linuxprobe ~]#touch /etc/yum.repos.d/CentOS-Base.repo

修改文件

[root@linuxprobe ~]#vim /etc/yum.repos.d/CentOS-Base.repo

[base] name=CentOS-$7 - Base - 163.com baseurl=http://mirrors.163.com/centos/7/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 [updates] name=CentOS-$7 - Updates - 163.com baseurl=http://mirrors.163.com/centos/7/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 [extras] name=CentOS-$7 - Extras - 163.com baseurl=http://mirrors.163.com/centos/7/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 [centosplus] name=CentOS-$7 - Plus - 163.com baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/ gpgcheck=1 enabled=0gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7


RHCE7.0 rpm 安装yum_第1张图片
CentOS-Base.rope

清空yum

[root@linuxprobe ~]#yum clean all

生成缓存

[root@linuxprobe ~]#yum makecache

OK!大功告成!!!

你可能感兴趣的:(RHCE7.0 rpm 安装yum)