CentOS 7 update source uses 163 yum source in China

Source: Internet
Author: User

CentOS 7 update source uses 163 yum source in China

1. Switch to the source directory:

[Root @ localhost ~] # Cd/etc/yum. repos. d/

[Root @ localhost yum. repos. d] # ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo

2. Back up source files

[Root @ localhost yum. repos. d] # ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[Root @ localhost yum. repos. d] # Music CentOS-Base.repo CentOS-
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo
CentOS-Debuginfo.repo CentOS-Sources.repo
[Root @ localhost yum. repos. d] # Music CentOS-Base.repo CentOS-
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo
CentOS-Debuginfo.repo CentOS-Sources.repo
[Root @ localhost yum. repos. d] # Music CentOS-Base.repo CentOS-Base.repo.backup
[Root @ localhost yum. repos. d] # ls
CentOS-Base.repo.backup CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo
CentOS-Debuginfo.repo CentOS-Sources.repo

3. Download source file 163

[Root @ localhost yum. repos. d] # wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
-- 11:45:43 -- http://mirrors.163.com/.help/CentOS7-Base-163.repo
Resolving mirrors.163.com (mirrors.163.com)... 123.58.173.186, 123.58.173.185
Connecting to mirrors.163.com (mirrors.163.com) | 123.58.173.186 |: 80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1572 (1.5 K) [application/octet-stream]
Saving to: CentOS7-Base-163.repo


100% [============================================== >] 1,572 --. -K/s in 0 s


11:45:43 (68.7 MB/s)-CentOS7-Base-163.repo saved [1572/1572]


[Root @ localhost yum. repos. d] # ls-al
Total 48
Drwxr-xr-x. 2 root 4096 Mar 21.
Drwxr-xr-x. 76 root 8192 Mar 21 ..
-Rw-r --. 1 root 1572 May 18 2015 CentOS7-Base-163.repo
-Rw-r --. 1 root 1664 Dec 9 CentOS-Base.repo.backup
-Rw-r --. 1 root 1309 Dec 9 CentOS-CR.repo
-Rw-r --. 1 root 649 Dec 9 CentOS-Debuginfo.repo
-Rw-r --. 1 root 290 Dec 9 CentOS-fasttrack.repo
-Rw-r --. 1 root 630 Dec 9 CentOS-Media.repo
-Rw-r --. 1 root 1331 Dec 9 CentOS-Sources.repo

-Rw-r --. 1 root 1952 Dec 9 CentOS-Vault.repo

4. Generate Cache

[Root @ localhost yum. repos. d] # yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras updates
Cleaning up everything
Cleaning up list of fastest mirrors
[Root @ localhost yum. repos. d] # yum makecache
Loaded plugins: fastestmirror
Base | 3.6 kB
Extras | 3.4 kB: 00
Updates | 3.4 kB: 00
(1/12): base/7/x86_64/group_gz | 155 kB
(2/12): base/7/x86_64/filelists_db | 6.2 MB
(3/12): extras/7/x86_64/prestodelta | 25 kB: 00
(4/12): extras/7/x86_64/primary_db | 101 kB
(5/12): extras/7/x86_64/filelists_db | 258 kB
(6/12): updates/7/x86_64/prestodelta | 275 kB
(7/12): extras/7/x86_64/other_db | 317 kB
(8/12): base/7/x86_64/other_db | 2.3 MB
(9/12): base/7/x86_64/primary_db | 5.3 MB
(10/12): updates/7/x86_64/filelists_db | 1.9 MB
(11/12): updates/7/x86_64/primary_db | 3.2 MB
(12/12): updates/7/x86_64/other_db | 27 MB
Determining fastest mirrors
Metadata Cache Created
[Root @ localhost yum. repos. d] #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.