Linux system replacement Network Yum source

Source: Internet
Author: User
Tags gpg

This method is tested on the centos6.x version, and other versions download the corresponding version of the Yum source.

#配置之前记得备份好原本的yum文件, avoid configuration errors hard to retrieve #

NetEase 64-bit CENTOS6 yum source

Http://mirrors.163.com/.help/CentOS6-Base-163.repo

Switch to the/etc/yum.repos.d/directory and view:

[Email protected] ~]$ cd/etc/yum.repos.d/

[email protected] yum.repos.d]# LL

Total Dosage 24

-rw-r--r--. 1 root root 1991 August 4 00:13 Centos-base.repo

-rw-r--r--. 1 root root 647 August 4 00:13 Centos-debuginfo.repo

-rw-r--r--. 1 root root 289 August 4 00:13 Centos-fasttrack.repo

-rw-r--r--. 1 root root 630 August 4 00:13 Centos-media.repo

-rw-r--r--. 1 root root 6259 August 4 00:13 Centos-vault.repo

Back up the local Yum Source:

[Email protected] yum.repos.d]# MV Centos-base.repo Centos-base.repo.ori

[email protected] yum.repos.d]# LL

Total Dosage 28

-rw-r--r--. 1 root root 2006 September Centos6-base-163.repo

-rw-r--r--. 1 root root 1991 August 4 00:13 Centos-base.repo.ori

-rw-r--r--. 1 root root 647 August 4 00:13 Centos-debuginfo.repo

-rw-r--r--. 1 root root 289 August 4 00:13 Centos-fasttrack.repo

-rw-r--r--. 1 root root 630 August 4 00:13 Centos-media.repo

-rw-r--r--. 1 root root 6259 August 4 00:13 Centos-vault.repo

Use the wget command to download the 64-bit CENTOS6 yum source in NetEase and view the results:

[Email protected] yum.repos.d]# wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo

--2016-01-19 04:21:35--Http://mirrors.163.com/.help/CentOS6-Base-163.repo

Parsing host mirrors.163.com ... 123.58.173.186, 123.58.173.185

Connecting mirrors.163.com|123.58.173.186|:80 ... is connected.

An HTTP request has been made and is waiting for a response ... OK

Length: 2006 (2.0K) [Application/octet-stream]

Saving to: "Centos6-base-163.repo"

100%[======================================>] 2,006--.-k/s in 0s

2016-01-19 04:21:35 ($ mb/s)-Saved "Centos6-base-163.repo" [2006/2006])

[email protected] yum.repos.d]# LL

Total Dosage 28

-rw-r--r--. 1 root root 2006 September Centos6-base-163.repo

-rw-r--r--. 1 root root 1991 August 4 00:13 Centos-base.repo.ori

-rw-r--r--. 1 root root 647 August 4 00:13 Centos-debuginfo.repo

-rw-r--r--. 1 root root 289 August 4 00:13 Centos-fasttrack.repo

-rw-r--r--. 1 root root 630 August 4 00:13 Centos-media.repo

-rw-r--r--. 1 root root 6259 August 4 00:13 Centos-vault.repo

To modify the local Yum source image:

[Email protected] yum.repos.d]# MV Centos6-base-163.repo Centos-base.repo

[email protected] yum.repos.d]# LL

Total Dosage 28

-rw-r--r--. 1 root root 2006 September Centos-base.repo #修改后的网易yum源镜像

-rw-r--r--. 1 root root 1991 August 4 00:13 Centos-base.repo.ori #原国外Centos官网镜像

-rw-r--r--. 1 root root 647 August 4 00:13 Centos-debuginfo.repo

-rw-r--r--. 1 root root 289 August 4 00:13 Centos-fasttrack.repo

-rw-r--r--. 1 root root 630 August 4 00:13 Centos-media.repo

-rw-r--r--. 1 root root 6259 August 4 00:13 Centos-vault.repo

Import the key and upgrade the software:

[Email protected] yum.repos.d]# rpm--import/etc/pki/rpm-gpg/rpm-gpg-key*

[email protected] yum.repos.d]# Yum upgrade

To view the installed package group:

[email protected] yum.repos.d]# Yum grouplist


This article is from the "12203305" blog, please be sure to keep this source http://12213305.blog.51cto.com/12203305/1865400

Linux system replacement Network Yum source

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.