本文最后更新于:June 5, 2019 pm
                
              
            
            
              在CentOS7.6和Ubuntu18.04上面更换软件源为阿里源。
1、Ubuntu18.04
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
   |  sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
 
  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-security main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
 
 
  sudo apt-get update sudo apt-get upgrade
 
  | 
 
2、CentOS7
 |  cd /etc/yum.repos.d mv CentOS-Base.repo CentOS-Base.repo.bak
 
  wget http://mirrors.aliyun.com/repo/Centos-7.repo -O CentOS-Base.repo
 
  yum clean all yum makecache yum update
 
  |