ubuntu配置阿里云源

换成国内最快的阿里云源

第一步:备份原来的源文件

cd /etc/apt/

然后会显示下面的源文件sources.list 
输入命令 
sudo cp sources.list sources.list.bak 
就是将sources.list备份到sources.list.bak

第二步:替换源

阿里云源的文件

    deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
    ##测试版源
    deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
    # 源码
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
    ##测试版源
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
    # Canonical 合作伙伴和附加
    deb http://archive.canonical.com/ubuntu/ xenial partner
    deb http://extras.ubuntu.com/ubuntu/ xenial main

替换并保存 
sudo gedit sources.list打开文件,替换成阿里云文件即可

第三步:更新源和软件

   sudo apt-get update 更新源
   sudo apt-get upgrade 更新软件 

原文地址:https://www.cnblogs.com/nixingguo/p/9017805.html

时间: 2024-10-09 20:45:12

ubuntu配置阿里云源的相关文章

Ubuntu换阿里云源

sudo -s cd /etc/apt gedit source.list deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-s

pip配置阿里云源

1.Ctrl+R 输入 %APPDATA% 2.新建pip目录,并在pip目录下新建pip.ini 3.在pip.ini中输入: [global] index-url = http://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com 原文地址:https://www.cnblogs.com/chenzhaoyu/p/9733734.html

redhat7配置阿里云的yum源并安装httpd服务  

1.配置yum源 [base] name=CentOS-$releasever - Base - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/7/os/x86_64/ gpgcheck=1 enabled=1 gpgkey=http://mirrors.aliyun.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7 2.更新yum源 y

Ubuntu/Mint更换阿里云源

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份 sudo vim /etc/apt/sources.list #修改 sudo apt-get update #更新列表 阿里云源 deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trust

Ubuntu 14.04 更换阿里云源

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份 sudo vim /etc/apt/sources.list #修改 sudo apt-get update #更新列表 阿里云源 deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trust

CentOS7安装(三)- 配置阿里云yum源

CentOS7安装(三)- 配置阿里云yum源 CentOS7安装好以后,完成网络配置以后,就是开始配置yum源,因为yum安装我们需要的各种软件. 具体步骤如下: 1.打开centos的yum文件夹 输入命令 cd /etc/yum.repos.d/ 2.用wget下载repo文件 输入命令wget:http://mirrors.aliyun.com/repo/Centos-7.repo 如果wget命令不生效,说明还没有安装wget工具,输入yum -y install wget 回车进行安

Centos 7 配置阿里云 yum源和 安装 EPEL源

配置阿里云 yumwget -O /etc/yum.repos.d/CentOS-Baseali.repo http://mirrors.aliyun.com/repo/Centos-7.repo下载 repo到相应目录中 cd /etc/yum.repos.d/切换至 yum.repos.d 目录 ls查看目录中文件 yum clean all清空yum缓存 yum makecache建立yum缓存 yum reposlist查看仓库列表 安装EPEL源 yum list | grep epe

CentOS-7配置阿里YUM源

配置阿里云YUM源:1,备份 #cd /etc/yum.repo.d/#mkdir repos#mv *.repo repos2,下载 #wget wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 3,#yum install -y epel-release.noarch 按装epel扩展源4,之后运行yum makecache生成缓存 原文地址:https://blog.

CentOS7搭建本地YUM仓库,并定期同步阿里云源

CentOS7同步阿里云镜像rpm包并自建本地yum仓库 系统环境 # cat /etc/centos-release CentOS Linux release 7.6.1810 (Core) # uname -r 3.10.0-957.el7.x86_64 # ip a |awk 'NR==9{print $2}'|awk -F '/' '{print $1}' 10.0.0.100 修改yum源为阿里云源 备份系统自带的yum源 # tar -zcvf CentOS-bk.tar.gz /e