CentOS 7アリクラウドyumソースの構成
CentOS 7アリクラウドyumソースの構成
[TOC]
バックアップ
[root@bogon ~]# cd /etc/yum.repos.d/
[root@bogon yum.repos.d]# mkdir repo_bak
[root@bogon yum.repos.d]# mv *.repo repo_bak/
[root@bogon yum.repos.d]# ls
repo_bak
新しいCentOS-Baseをダウンロードします。repoから/etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo
[root@bogon yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
--2018-02-09 16:33:46-- http://mirrors.aliyun.com/repo/Centos-7.repo
Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 124.14.2.234, 124.14.2.235, 124.14.2.217, ...
Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|124.14.2.234|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2573 (2.5K) [application/octet-stream]
Saving to: ‘/etc/yum.repos.d/CentOS-Base.repo’
100%[========================================================================================>] 2,573 --.-K/s in 0s
2018-02-09 16:33:47 (182 MB/s) - ‘/etc/yum.repos.d/CentOS-Base.repo’ saved [2573/2573]
[root@bogon yum.repos.d]# ls
CentOS-Base.repo repo_bak
その後yum clean allクリアキャッシュを実行し、yum makecacheを実行して新しいキャッシュを生成
[root@bogon yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras updates
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
Cleaning up list of fastest mirrors
[root@bogon yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/12): base/7/x86_64/group_gz | 156 kB 00:00:00
(2/12): extras/7/x86_64/filelists_db | 636 kB 00:00:07
(3/12): extras/7/x86_64/primary_db
[root@bogon ~]# cd /etc/yum.repos.d/
[root@bogon yum.repos.d]# mkdir repo_bak
[root@bogon yum.repos.d]# mv *.repo repo_bak/
[root@bogon yum.repos.d]# ls
repo_bak
[root@bogon yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
--2018-02-09 16:33:46-- http://mirrors.aliyun.com/repo/Centos-7.repo
Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 124.14.2.234, 124.14.2.235, 124.14.2.217, ...
Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|124.14.2.234|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2573 (2.5K) [application/octet-stream]
Saving to: ‘/etc/yum.repos.d/CentOS-Base.repo’
100%[========================================================================================>] 2,573 --.-K/s in 0s
2018-02-09 16:33:47 (182 MB/s) - ‘/etc/yum.repos.d/CentOS-Base.repo’ saved [2573/2573]
[root@bogon yum.repos.d]# ls
CentOS-Base.repo repo_bak
[root@bogon yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras updates
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
Cleaning up list of fastest mirrors
[root@bogon yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/12): base/7/x86_64/group_gz | 156 kB 00:00:00
(2/12): extras/7/x86_64/filelists_db | 636 kB 00:00:07
(3/12): extras/7/x86_64/primary_db