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. python Polygon模块安装

    pip install Polygon这样会安装不了 只能使用pip install Polygon2 或者 pip install Polygon3,也就是必须带版本号

  2. AI 线性代数

    1.标量.向量.矩阵和张量 1)标量(scalar),一个数,例如自然数和实数. 2)向量(vector),一列有序数.可以看作只有一列的矩阵. 3)矩阵(matrix),二维数组.转置(transp ...

  3. AI mac安装TensorFlow

    1.安装pip sudo easy_install pip 2.安装virtualenv sudo pip install --upgrade virtualenv 3.在指定目录创建virtuale ...

  4. Ubuntu下 AndroidStudio 无法识别设备的问题

    最近想搞一下 Android的软件开发 于是下决心,开始研究ubuntu 环境下android studio 的配置.对于我这个对APP一无所知的技术小白,还是遇到很多的问题. 1.先拔掉数据线,按下 ...

  5. os模块和shutil模块

    # coding=utf-8 import os path="D:\\test" ######### 目录结构如下 # test # / \ \ \ # test01 test02 ...

  6. CF1028G Guess the Numbers 构造、记忆化搜索

    传送门 考虑如果我们当前可以询问\(x\)个数,还剩下\(q\)次询问机会,我们要怎么构造询问方式? 肯定会这么考虑: 找到一个尽可能大的\(P\)满足\([x,P]\)能在每一次能询问\(x\)个数 ...

  7. WPF中, 启用添加到RichTextBox中的控件

    原文:WPF中, 启用添加到RichTextBox中的控件   WPF中, 启用添加到RichTextBox中的控件                                           ...

  8. vsftpd虚拟账户配置

    1. 概述 FTP是文件传输协议,在内外网的文件传输中使用广泛. 本篇博客主要介绍FTP服务器的部署和测试. 2. 软件环境部署 查看系统是否安装FTP软件(vsftpd),执行命令:rpm -qa ...

  9. EF5.0区别于EF4.0的crud区别

    public T AddEntity(T entity) { //EF4.0的写法 添加实体 //db.CreateObjectSet<T>().AddObject(entity); // ...

  10. Linux lsof 命令

    lsof(list open files)是一个查看进程打开的文件的工具. 在 linux 系统中,一切皆文件.通过文件不仅仅可以访问常规数据,还可以访问网络连接和硬件.所以 lsof 命令不仅可以查 ...