• CentOS更换yum源


    centos7:
    163yum源:

    1)备份当前yum源防止出现意外还可以还原回来
    cd /etc/yum.repos.d/
    cp /CentOS-Base.repo /CentOS-Base-repo.bak
    2)使用wget下载163yum源repo文件
    wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
    3) 清理旧包
    yum clean all
    4)把下载下来163repo文件设置成为默认源
    mv CentOS7-Base-163.repo CentOS-Base.repo
    5)生成163yum源缓存并更新yum源
    yum makecache
    yum update

    阿里云yum源:
    1)备份当前yum源防止出现意外还可以还原回来
    cd /etc/yum.repos.d/
    cp /CentOS-Base.repo /CentOS-Base-repo.bak
    2)使用wget下载阿里yum源repo文件
    wget http://mirrors.aliyun.com/repo/Centos-7.repo
    3) 清理旧包
    yum clean all
    4)把下载下来阿里云repo文件设置成为默认源
    mv Centos-7.repo CentOS-Base.repo
    5)生成阿里云yum源缓存并更新yum源
    yum makecache
    yum update

    centos6

    1.首先备份原来的cent os官方yum源

    cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

    2.获取阿里的yum源覆盖本地官方yum源

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

    3.清理yum缓存,并生成新的缓存

    yum clean all
    yum makecache
  • 相关阅读:
    lightoj 1151 Snakes and Ladders 期望 高斯消元
    lightoj 1104 Birthday Paradox 概率
    lightoj 1079 Just another Robbery 概率 背包
    集合的划分
    线性筛法
    学姐出的毒奶题之yjj
    [poj] 1149 PIGS || 最大流经典题目
    [poj] 3057 Evacuation
    [poj] 1273 Drainage Ditches
    [poj] 2891 Strange Way to Express Integers
  • 原文地址:https://www.cnblogs.com/yangyangming/p/12516780.html
Copyright © 2020-2023  润新知