常用第三方yum源仓库地址及配置

常用第三方yum源仓库地址及配置根据自己的系统版本选择复制粘贴执行即可#163yum源:(Centos5、6、7版本)cd/etc/yum.repos.d/wgethttp://mirrors.163.com/.help/CentOS5-Base-163.repowgethttp://mirrors.163.com/.help/CentOS6-Base-163.repowgethttp://mirr…

大家好,欢迎来到IT知识分享网。常用第三方yum源仓库地址及配置"

根据自己的系统版本选择复制粘贴执行即可
# 163yum源:(Centos5、6、7版本)

cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS5-Base-163.repo wget http://mirrors.163.com/.help/CentOS6-Base-163.repo wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

# 阿里云yum源(Centos5、6、7版本)

CentOS 5
wget -O /etc/yum.repos.d/aliyun-CentOS5-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repowget -O /etc/yum.repos.d/aliyun-epel5.repo http://mirrors.aliyun.com/repo/epel-5.repo
CentOS 6
wget -O /etc/yum.repos.d/aliyun-CentOS6-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repowget -O /etc/yum.repos.d/aliyun-epel6.repo http://mirrors.aliyun.com/repo/epel-6.repo
CentOS 7wget -O /etc/yum.repos.d/aliyun-CentOS7-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/aliyun-epel7.repo http://mirrors.aliyun.com/repo/epel-7.repo
#清除缓存,生成本地缓存,下次安装速度快
yum clean all && yum makecache

ubuntu各版本更换apt源

mv /etc/apt/sources.list /etc/apt/sources.list.bak

# 更改阿里源

首先备份本地的源

cp /etc/apt/sources.list /etc/apt/sources.list.bak-`date +%F`

#修改文件 删除原有内容,添加下面内容

vim /etc/apt/sources.list
#Ubuntu 14.04.5 LTS deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

#Ubuntu 16.04 LTS

deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe

#Ubuntu 18.04 LTS (bionic)

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-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed 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

# 更新apt源,读取新apt源到本地
apt updata 
# 更新本地所有软件包 apt upgrade

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/22050.html

(0)

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

关注微信