常用的第三方yum源apt源及配置

2021-10-19 05:36:01 字數 2865 閱讀 5968

根據自己的系統版本選擇複製貼上執行即可

# 163yum源:(centos5、6、7版本)

cd /etc/yum.repos.d/

wget

wget

wget

# 阿里雲yum源(centos5、6、7版本)

centos 5

wget -o /etc/yum.repos.d/aliyun-centos5-base.repo

wget -o /etc/yum.repos.d/aliyun-epel5.repo

centos 6

wget -o /etc/yum.repos.d/aliyun-centos6-base.repo

wget -o /etc/yum.repos.d/aliyun-epel6.repo

centos 7

wget -o /etc/yum.repos.d/aliyun-centos7-base.repo

wget -o /etc/yum.repos.d/aliyun-epel7.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 trusty main restricted universe multiverse

deb trusty-security main restricted universe multiverse

deb trusty-updates main restricted universe multiverse

deb trusty-proposed main restricted universe multiverse

deb trusty-backports main restricted universe multiverse

deb-src trusty main restricted universe multiverse

deb-src trusty-security main restricted universe multiverse

deb-src trusty-updates main restricted universe multiverse

deb-src trusty-proposed main restricted universe multiverse

deb-src trusty-backports main restricted universe multiverse

#ubuntu 16.04 lts

deb  xenial main

deb-src xenial main

deb xenial-updates main

deb-src xenial-updates main

deb xenial universe

deb-src xenial universe

deb xenial-updates universe

deb-src xenial-updates universe

deb xenial-security main

deb-src xenial-security main

deb xenial-security universe

deb-src xenial-security universe

#ubuntu 18.04 lts (bionic)

deb  bionic main restricted universe multiverse

deb-src bionic main restricted universe multiverse

deb bionic-security main restricted universe multiverse

deb-src bionic-security main restricted universe multiverse

deb bionic-updates main restricted universe multiverse

deb-src bionic-updates main restricted universe multiverse

deb bionic-proposed main restricted universe multiverse

deb-src bionic-proposed main restricted universe multiverse

deb bionic-backports main restricted universe multiverse

deb-src bionic-backports main restricted universe multiverse

# 更新apt源,讀取新apt源到本地

apt updata

# 更新本地所有軟體包

apt upgrade

常用的第三方yum源apt源及配置

根據自己的系統版本選擇複製貼上執行即可 163yum源 centos5 6 7版本 阿里雲yum源 centos5 6 7版本 清除快取,生成本地快取,下次安裝速度快 yum clean all yum makecache ubuntu各版本更換apt源 mv etc apt sources.lis...

常用第三方yum源倉庫位址及配置

根據自己的系統版本選擇複製貼上執行即可 163yum源 centos5 6 7版本 cd etc yum.repos.d wget wget wget 阿里雲yum源 centos5 6 7版本 centos 5 wget o etc yum.repos.d aliyun centos5 base....

centos 第三方源

最後附上第三方源 centos由於很追求穩定性,所以官方源中自帶的軟體不多,因而需要一些第三方源,比如epel atrpms elrepo nux dextop repoforge等。epel epel即extra packages for enterprise linux,為centos提供了額外...