#主要是为了提高安装速度以及epel中自带源众多木有的软件。

#Author wood_man
#2016.06.01 v 2.0

1. 测试环境

VMware 10.0    
CentOS release 6.6 (Final) i386  
kernel 2.6.32-504.el6.i686  
 
2.准备工作
(1) 删除yum源
#rm -f /etc/yum.repo.d/*
(2) 安装和配置 
网易:
#wget http://mirrors.163.com/.help/CentOS6-Base-163.repo -O /etc/yum.repos.d/163.repo 

重庆大学:
#wget http://mirrors.cqu.edu.cn/distri/CentOS/6/CentOS-Base.repo

#网易和重庆大学的镜像配置一个即可。

epel:

#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
#(如果报错则)epel.repo中注释所有的"#mirrorlist"使用"baseurl"并且"enabled=1"。
#sed -r -i 's@#(baseurl)@\1@g' epel.repo
# sed -i 's@mirrorlist@#&@g' epel.repo
 
本地源 :

#cat /etc/yum.repos.d/local.repo
[Local]
name=Centos6 - Local
enabled=1

gpgcheck=0 
 

#yum clean all 
#yum makecache 
#慎用缓存到本地安装速度快,但占用带宽和磁盘;缓存位置在/etc/yum.conf定义。
#yum repolist
 

#删除epel
rpm -e --nodeps(强制)  epel-release

Centos6 换源的更多相关文章

  1. pip 安装更新卸载 pip/yum换源

    pip安装:sudo apt-get install python3-pip pip更新:sudo pip3 install --upgrade pip pip卸载:sudo apt-get remo ...

  2. Linux换源+编译内核总结

    换源: 我用的是CentOS,所以下面以其为例,其它OS做法类似,可作参考: 在主机能联网的情况下 进入存放源配置的文件夹 cd /etc/yum.repos.d 备份默认源 mv ./CentOS- ...

  3. npm换源

    作者一介布衣:http://yijiebuyi.com/blog/b12eac891cdc5f0dff127ae18dc386d4.html npm 是node.js 环境下的包管理器,非常强大智能. ...

  4. ubuntu 换源

    经过自己一番折腾后,发现用这个方法换源最简单.直接. sudo vi /etc/apt/sources.list 把sources.list里面的内容全部替换为一下内容 deb http://mirr ...

  5. pip换源安装

    pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple 要安装的 有些工具安装太慢, 换源安装一下, 速度一下子飞起

  6. cocoapods 换源

    1. 用以下步骤换源: pod repo remove master pod repo add master https://code.aliyun.com/Magi/CocoaPods.git po ...

  7. Anaconda换源小记

    如果还没有安装可以参考:https://www.cnblogs.com/dotnetcrazy/p/9158715.html 一键更新所有库:conda update --all 清华的源有时候有点小 ...

  8. brew安装和换源

    命令行执行ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&q ...

  9. kalinux 换源

    1.系统使用第一步建议先换源,否则将出现很多未知问题 #以下两个2选1,打开要编辑的源 sudo leafpad /etc/apt/sources.list sudo gedit /etc/apt/s ...

随机推荐

  1. 理解WebService SOAP WSDL

    WebServices简介 先给出一个概念 SOA ,即Service Oriented Architecture ,中文一般理解为面向服务的架构, 既然说是一种架构的话,所以一般认为 SOA 是包含 ...

  2. 在ASP.NET MVC项目中使用React

    (此文章同时发表在本人微信公众号"dotNET每日精华文章",欢迎右边二维码来关注.) 题记:最近在开发钉钉的微应用,考虑到性能和UI库的支持,遂采用了React来开发前端. 目前 ...

  3. sql Lloader

    create table ban_ji(id integer,ban_ji varchar2(25))insert into ban_ji values(1,'1-(1)');insert into ...

  4. asp.net 数据库面试题(基础)

    今天到某公司笔试,数据库考的比较多,但是说老实话,考的也比较基础.现在趁回忆得起来,将数据库知识简单整理如下: 一.建表指令 比如创建一个学生表student,它由学号Sno,姓名Sname,性别Ss ...

  5. C# MessageBox常用用法

    if(MessageBox.Show("message", "title", MessageBoxButtons.OKCancel,MessageBoxIcon ...

  6. HBase change split policy on an existing table

    hbase(main)::> create 'test_table_region', 'username' row(s) in 1.2150 seconds hbase(main)::> ...

  7. jQuery 利用 parent() parents() 寻找父级 或祖宗元素

    $(this).parent().parent().parent().parent().parent().remove(); //此方法通过parent()一级一级往上找   $(this).pare ...

  8. struts2自定义MVC框架

    自定义MVC:(首先了解Model1和Model2的概念) Model1与Model2: Model1:就是一种纯jsp开发技术,将业务逻辑代码和视图渲染代码杂糅在一起. Model2:Model2是 ...

  9. 复制文件的问题:使用FileInputStream和FileOutputStream实现文件复制

    public class Test{ public static void main(String [] args) { Test t=new Test(); t.upload(); } public ...

  10. DBUtils

    DBUtils中核心对象 > QueryRunner类 它提供了操作数据增删改查的方法 query() 执行select语句的 update() 执行insert update delete 语 ...