• redhat换用centos源


    解除原有源
    rpm -aq|grep yum|xargs rpm -e --nodeps
    rpm -aq|grep python-iniparse|xargs rpm -e --nodeps

    rpm -qa | grep yum
    检验是否删除干净
    下载四个包:
    wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/yum-3.4.3-132.el7.centos.0.1.noarch.rpm
    # wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
    # wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
    # wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm包

    wget -c http://centos.ustc.edu.cn/centos/7/os/x86_64/Packages/yum-3.4.3-150.el7.centos.noarch.rpm

    rpm -ivh *.rpm
    注意可能需要根据提示多删除或添加一些包
    rpm -qa | grep yum
    检验yum是否安装成功

    替换文件内容,注意repo网址需可达
    vim /etc/yum.repos.d/CentOS-Base.repo

    [base]
    name=CentOS-$releasever - Base - 163.com
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    baseurl=http://mirrors.163.com/centos/7.1.1503/os/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

    #released updates
    [updates]
    name=CentOS-$releasever - Updates - 163.com
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
    baseurl=http://mirrors.163.com/centos/7.1.1503/updates/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras - 163.com
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
    baseurl=http://mirrors.163.com/centos/7.1.1503/extras/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

    #additional packages that extendfunctionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus - 163.com
    baseurl=http://mirrors.163.com/centos/7.1.1503/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

    yum clean all

    yum makecache

  • 相关阅读:
    Monogb基本概念及基本操作
    高级查询与索引
    查询、索引和聚合
    更新和删除文档
    数据查询
    数据库和集合的基本操作
    dedecms 文章排列方式
    dedecms flag标签属性
    Iis 日志文件默认路径
    php中的require() 语句的使用方法
  • 原文地址:https://www.cnblogs.com/slqt/p/6509678.html
Copyright © 2020-2023  润新知