CentOS换源

  • YUM源

    1. 备份原来的repo文件

      mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    2. 在CentOS中配置使用网易或阿里的开源镜像

      网易开源镜像站

      阿里开源镜像站

      开源镜像站中有相应教程,下面使用阿里的源。

    3. 下载新的CentOS-Base.repo 到/etc/yum.repos.d/

      • CentOS 5

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

        或者

        curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
      • CentOS 6

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

        或者

        curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
      • CentOS 7

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

        或者

        curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    4. 之后运行

      yum clean all
      yum makecache

      生成缓存

  • EPEL源

    EPEL源在CentOS默认不存在,需要下载安装

    yum list | grep epel-release
    yum install epel-release

    安装完成后,在/etc/yum.repos.d多出如下两个文件

    epel-testing.repo epel.repo

    下载阿里开源镜像的EPEL源

    wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo

    之后运行

    yum clean all
    yum makecache

    生成缓存

CentOS换yum源和epel源为国内源的更多相关文章

  1. CentOS7系统配置国内yum源和epel源

    1.首先进入/etc/yum.repos.d/目录下,新建一个repo_bak目录,用于保存系统中原来的repo文件 [root@bogon ~]# cd /etc/yum.repos.d/ [roo ...

  2. CentOS7配置阿里云yum源和EPEL源

    配置阿里云yum源(参考:http://mirrors.aliyun.com/help/centos) 1.备份 [root@bogon ~]# cd /etc/yum.repos.d/ [root@ ...

  3. centos6更换yum源和epel源

    epel是yum的一个软件用源,包含了很多基本源中没有的软件,cobbler就属于基本源中没有的软件,所以需要安装epel源. yum源: wget -O /etc/yum.repos.d/CentO ...

  4. Linux学习 - 02 使用 - Centos8 - 『更换rpm/epel包源为国内源』

    1. Centos8 - 『更换rpm/epel包源为国内源』 centos 8 默认是会读取centos.org的mirrorlist的,所以一般来说是不需要配置镜像的. 如果你的网络访问mirro ...

  5. pip 源 替换国内源

    网上收集来的pip源地址: 阿里云 http://mirrors.aliyun.com/pypi/simple/中国科技大学 https://pypi.mirrors.ustc.edu.cn/simp ...

  6. Docker入门之 - 更换源为国内源,实现快速下载image

    原文:Docker入门之 - 更换源为国内源,实现快速下载image 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/u012055638/artic ...

  7. CentOS换yum源为国内源

    CentOS换源 yum源 备份原来的文件. mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup ...

  8. 如何在CentOS 7上安装EPEL源

    EPEL 是什么? EPEL (Extra Packages for Enterprise Linux,企业版Linux的额外软件包) 是Fedora小组维护的一个软件仓库项目,为RHEL/CentO ...

  9. centos 6.4 使用epel 源

    EPEL是RHEL 的 Fedora 软件仓库,把它添上,你就可以获得 RHEL AS 的高质量.高性能.高可靠性,又需要方便易用(关键是免费)的软件包更新功能.EPEL(Extra Packages ...

随机推荐

  1. PAT Advanced 1066 Root of AVL Tree (25) [平衡⼆叉树(AVL树)]

    题目 An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child ...

  2. A - Alice and the List of Presents (排列组合+快速幂取模)

    https://codeforces.com/contest/1236/problem/B Alice got many presents these days. So she decided to ...

  3. (函数)P1149 火柴棒等式

    题解: #include<stdio.h>int a[10]={6,2,5,5,4,5,6,3,7,6};int num(int n){                          ...

  4. Python创建命令行应用的工具 tools for command line application in python

    工具1:Docopt 地址:http://docopt.org/ 这个工具是根据模块的文档注释来确定参数的.注释分为两部分:Usage, option. \``` Usage: naval_fate ...

  5. Spring DATA Neo4J(一)

    Spring DATA Neo4J——简介 Spring Framework提供了一下模块来处理基于Java的应用程序的DAO层 Spring JDBC Spring ORM Spring DATA ...

  6. IPC---有名管道FIFO

    一.参考网址 1.Linux学习之——FIFO实例

  7. 91.一次性处理多条数据的方法:bulk_create,update,delete

    (1)bulk_create: 可以一次性的创建多个对象 示例代码如下: from django.http import HttpResponse from .models import Pulish ...

  8. java生成6位数所有组合

    for(int i=0;i<=9;i++){ String str=""; str=str+i; String strj=""; for(int j=0; ...

  9. linux中awk的应用

    1.awk的基本认识和使用方法,参考下面链接 https://www.cnblogs.com/timxgb/p/4658631.html 2.awk中关于条件判断的用法,如 https://blog. ...

  10. POJ-2031 Building a Space Station (球的最小生成树)

    http://poj.org/problem?id=2031 Description You are a member of the space station engineering team, a ...