美文网首页
CentOS7 下安装yum

CentOS7 下安装yum

作者: 睡鼠zzZ | 来源:发表于2020-07-29 18:05 被阅读0次

    1.创建yum文件夹

    cd /usr/local

    mkdir ./yum

    cd yum

    2.下载yum源文件

    wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-167.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-53.el7.noarch.rpm

    wgwt http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.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-167.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-53.el7.noarch.rpm

    这两个包要同时安装,否则会相互依赖

    4.处理配置

    cd /etc/yum.repos.d

    wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

    5.删除原来的配置文件

    rm -rf CentOS-Base.repo

    6.修改新配置文件名 

    mv CentOS7-Base-163.repo CentOS7-Base.repo

    7.测试

    yum --version

    相关文章

      网友评论

          本文标题:CentOS7 下安装yum

          本文链接:https://www.haomeiwen.com/subject/cbdkrktx.html