CentOS之yum映象源

2021-08-29 18:39:49 字數 1314 閱讀 2334

1、首先備份系統自帶yum源配置檔案/etc/yum.repos.d/centos-base.repo 

mv /etc/yum.repos.d/centos-base.repo /etc/yum.repos.d/centos-base.repo.backup
2、進入yum源配置檔案所在的資料夾

cd /etc/yum.repos.d/
163的yum源配置檔案

##centos7

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

##centos6

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

##centos5

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

ailiyun的yum源配置檔案 

#centos-7

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

#centos-6

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

#centos-5

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

4、執行yum makecache生成快取

yum makecache
5、執行yum makecache日誌資訊

[root@localhost ~]# yum -y update

已載入外掛程式:fastestmirror, refresh-packagekit, security

設定更新程序loading mirror speeds from cached hostfile

* base: mirrors.163.com

* extras: mirrors.163.com

* updates: mirrors.163.com

## 或者是

已載入外掛程式:fastestmirror, refresh-packagekit, security

設定更新程序loading mirror speeds from cached hostfile

* base: mirrors.aliyun.com

* extras: mirrors.aliyun.com

* updates: mirrors.aliyun.com

centos配置yum源為中國映象源

修改centos預設yum源為mirrors.163.com 1 首先備份系統自帶yum源配置檔案 etc yum.repos.d centos base.repo 1 root localhost mv etc yum.repos.d centos base.repo etc yum.repos....

CentOS 更改 yum 映象源為阿里雲映象源

確認 centos 版本,在終端中輸入 cat proc version會得到一下內容,el7則代表為 centos 7 版本。linux version 3.xx.x x.xx.x.el7.x86 64 mockbuild kbuilder.bsys.centos.org gcc version ...

CentOS使用ISO映象做本地YUM源

1 建立iso存放目錄和掛載目錄 mkdir mnt iso mkdir mnt cdrom2 上傳iso映象檔案到iso存放目錄 mnt iso下 3 掛載iso映象到掛載目錄 mnt cdrom下 mount o loop mnt iso xx.iso mnt cdrom4 使用df h命令查詢...