• 红帽配置Centos仓库[红帽Redhat7替换Centos7网络源]


    1.卸载红帽yum源
    rpm -e $(rpm -qa|grep yum) --nodeps
    
    2.删除所有repo相关文件
    rm -rf /etc/yum.conf
    rm -rf /etc/yum.repos.d/
    rm -rf /var/cache/yum
    
    3.下载centos相关yum组件
    wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-3.4.3-154.el7.centos.noarch.rpm
    wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
    wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm
    wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-42.el7.noarch.rpm
    wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-42.el7.noarch.rpm
    
    //如果没有wget命令则使用curl命令
    curl -o yum-utils-1.1.31-42.el7.noarch.rpm  https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-42.el7.noarch.rpm
    curl -o yum-3.4.3-154.el7.centos.noarch.rpm  https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-3.4.3-154.el7.centos.noarch.rpm
    curl -o yum-metadata-parser-1.1.4-10.el7.x86_64.rpm  https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
    curl -o yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm   https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm
    curl -o yum-updateonboot-1.1.31-42.el7.noarch.rpm https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-42.el7.noarch.rpm
    
    3.安装所有相关组件
    [root@xuliangwei-node1 ~]# rpm -ivh yum-*
    
    4.下载base和epel仓库
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    sed -i 's#$releasever#7#g' /etc/yum.repos.d/CentOS-Base.repo
    
    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
    
  • 相关阅读:
    三元运算符嵌套问题
    tp框架利用redis存储session
    PHP date('W')遇到跨年问题
    AES加解密 集成 spring MVC
    python SMTP 发送邮件
    mysql数据库安装过程
    (转)Apache启动过程
    apache服务器全局配置详解
    Apache 的 httpd.conf 详解(很实用)
    安装apache遇到的问题总结
  • 原文地址:https://www.cnblogs.com/xuliangwei/p/10680639.html
Copyright © 2020-2023  润新知