centos運用阿里雲的yum源

2021-08-29 20:30:43 字數 1580 閱讀 3335

首先在這個**可以找到相關yum原始碼配置方法:

centos

1、備份

centos 5

wget -o /etc/yum.repos.d/centos-base.repo

或者curl -o /etc/yum.repos.d/centos-base.repo

centos 6

wget -o /etc/yum.repos.d/centos-base.repo

或者curl -o /etc/yum.repos.d/centos-base.repo

centos 7

wget -o /etc/yum.repos.d/centos-base.repo

或者curl -o /etc/yum.repos.d/centos-base.repo

3、之後執行yum makecache生成快取

1、備份sources.list

cp /etc/apt/sources.list /etc/apt/sources.list_backup
2、更改源,vim /etc/apt/sources.list,內容如下:

deb-src  xenial main restricted #added by software-properties

deb xenial main restricted

deb-src xenial main restricted multiverse universe #added by software-properties

deb xenial-updates main restricted

deb-src xenial-updates main restricted multiverse universe #added by software-properties

deb xenial universe

deb xenial-updates universe

deb xenial multiverse

deb xenial-updates multiverse

deb xenial-backports main restricted universe multiverse

deb-src xenial-backports main restricted universe multiverse #added by software-properties

deb xenial partner

deb-src xenial partner

deb xenial-security main restricted

deb-src xenial-security main restricted multiverse universe #added by software-properties

deb xenial-security universe

deb xenial-security multiverse

3、記得更新源,不更新資料來源是不能用的

yum makecache

CentOS 更換為阿里雲的yum源

簡介 centos,是基於 red hat linux 提供的可自由使用源 的企業級 linux 發行版本 是乙個穩定,可 可管理和可複製的免費企業級計算平台。配置方法 1.備份mv etc yum.repos.d centos base.repo etc yum.repos.d centos ba...

CentOS 7 配置阿里雲的Yum源

1.禁用 yum外掛程式 fastestmirror 1 修改外掛程式的配置檔案 cp etc yum pluginconf.d fastestmirror.conf etc yum pluginconf.d fastestmirror.conf.bak vi etc yum pluginconf....

CentOS7使用阿里雲的yum源

替換成阿里雲的yum源速度更快一些,替換很簡單,簡單記錄一下步驟 1 備份原來的yum源 sudo cp etc yum.repos.d centos base.repo etc yum.repos.d centos base.repo.bak 2 安裝wget工具 yum install wget...