Ubuntu

首先编辑sources.list这个文件

vi /etc/apt/sources.list

把sources.list文件内容替换成如下

deb http://mirrors.aliyun.com/debian wheezy main contrib non-free
deb-src http://mirrors.aliyun.com/debian wheezy main contrib non-free
deb http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free
deb http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free

接下来执行以下命令,就完成阿里云kali linux镜像源了

apt-get update

Centos

修改CentOS默认yum源为mirrors.aliyun.com
1、首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo

1
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2、下载ailiyun的yum源配置文件到/etc/yum.repos.d/
CentOS7

1
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

CentOS6

1
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

CentOS5

1
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

3、运行yum makecache生成缓存

1
[root@localhost ~]# yum makecache

4、这时候再更新系统就会看到以下mirrors.aliyun.com信息

1
2
3
4
5
6
[root@localhost ~]# yum -y update
已加载插件:fastestmirror, refresh-packagekit, security
设置更新进程Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com

 

linux 源的配置更新的更多相关文章

  1. kali linux 2.0配置更新源后apt-get update 报错

    这个是我/etc/apt/sources.list的更新源: deb http://http.kali.org/kali kali-rolling main contrib non-free deb ...

  2. linux替换yum源及配置本地源

    linux系统安装后自带的bash源由于在国外,安装软件包的时候会非常慢,最好替换一下yum源. ​关于yum源的简单介绍 ​           yum的主要功能是更方便地添加,删除和更新rpmba ...

  3. 更新Alpine Linux源 sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories apk add xxx

    更新Alpine Linux源 国内镜像源 清华TUNA镜像源:https://mirror.tuna.tsinghua.edu.cn/alpine/中科大镜像源:http://mirrors.ust ...

  4. 如何更新Linux源

    首先需要自己收藏几个可以得到Linux源的站点,比如:http://mirrors.163.com/ (163的镜像站):可以百度搜索[Linux镜像站]: 下面这些镜像站,转自:http://www ...

  5. linux里如何配置本地yum源和外网yum源

    一:本地和外网源配置方法 二:外网YUM源的地址 一: ① 本地源配置方法:以光盘里rpm举例(这里使用虚拟机演示) 1.挂载一个iso的镜像 把光盘挂载到一个目录里,然后进入/etc/yum.rep ...

  6. linux 配置本地yum源,配置国内yum源,配置epel源

    目录 一.配置本地yum源 二.配置国内yum源和epel源 一.配置本地yum源 1.挂载ISO镜像 mount -o loop /mnt/yum-iso/CentOS-7-x86_64-DVD-1 ...

  7. Kali Linux 下安装配置MongoDB数据库 ubuntu 下安装配置MongoDB源码安装数据库

    Kali Linux 下安装配置MongoDB数据库   1.下载mongodb.tgz 压缩包: 2.解压到:tar -zxvf mongodb.tgz /usr/local/mongodb 3.创 ...

  8. 安装linux系统并配置那点事

    安装完成后,将看到如下控制台: 输入以上安装信息中所填写的用户名(user),随后输入密码(user),即可登录 Ubuntu. 随时可使用 Ctrl + Alt 快捷键可离开虚拟机. 3 配置 Ub ...

  9. linux 网桥的配置与实现

    ==================================================================================from: http://www.i ...

随机推荐

  1. 如何使用zabbix初级监控

    如何用zabbix监控(初步使用)? 前提:必须启动mysql 和zabbix目录下的sbin中的zabbix_agentd zabbix_server,还有nginx以及php否则会报错,因为zab ...

  2. http协议进阶(六)代理

    web代理服务器是网络的中间实体,位于客户端和服务器之间,扮演“中间人”的角色,作用是在各端点之间来回传送报文. 其原理是:客户端向代理服务器发送请求报文,代理服务器正确的处理请求和连接,然后返回响应 ...

  3. day81

    昨日回顾: 昨日回顾: auth组件: -验证:authenticat(request,username=') -登录:login(request,user) -注销:logout(request), ...

  4. c语言学习5

    break 和 continue之间的区别: 在1000人中,募捐100000元,当达到10万元后结束   break 跳出当前循环,即  是终止循环,continue结束本次循环,不终止循环 #in ...

  5. 复习整理9:SpringMVC应用以及源码解析

    一:SpringMVC是什么 SpringMVC只是Spring的一个子框架,作用学过Struts2的应该很好理解,他们都是MVC的框架.学他就是用来代替Struts2的,那么为什么不用Struts2 ...

  6. echarts 响应式布局

    <body> <!-- 为ECharts准备一个具备大小(宽高)的Dom --> <div id="main" style="width: ...

  7. Luogu P4137 Rmq Problem / mex

    区间mex问题,可以使用经典的记录上一次位置之后再上主席树解决. 不过主席树好像不是很好写哈,那我们写莫队吧 考虑每一次维护什么东西,首先记一个答案,同时开一个数组记录一下每一个数出现的次数. 然后些 ...

  8. Luogu P4053 [JSOI2007]建筑抢修

    一道贪心题,看数据范围就知道要套一个数据结构上去. 别走啊不是什么很高级的数据结构 考虑最朴素的想法,按建筑的抢修时间排序并先拿小的 然后随便想想都可以找到一堆反例 所以我们就直接考虑模拟这个过程,按 ...

  9. Ionic 2.0 相关资料

    原文发表于我的技术博客 本文汇总了学习 Ionic 2 的相关资料,也算是一个 Ionic Awesome 列表,供大家参考,有需要分享的可以留言. 原文发表于我的技术博客 1. 文档 1.1 Ion ...

  10. Nginx反向代理中使用proxy_redirect重定向url

    在使用Nginx做反向代理功能时,有时会出现重定向的url不是我们想要的url,这时候就可以使用proxy_redirect进行url重定向设置了.proxy_redirect功能比较强大,其作用是对 ...