Centos6.5 replacing the Yum source

Source: Internet
Author: User

Centos6.5 updating the yum source

The tool for installing software under Linux is called the yum tool, andLinux binary packages are usually rpm packages. Similar to the exe program under Windows.

Install the software via Yum , the default software configuration for RPM packages is downloaded from a foreign Centos official source, so the installation speed will be slower, When we use it, we will change the configuration of the default rpm package from a foreign official source to a domestic excellent yum source. The following is the process of replacing an official source with a source of 163.

1.1 To view yum files: Cat/etc/yum.repos.d/centos-base.repo , you can see that the displayed URLs are pointing to the The source of the Centos website

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/7C/74/wKioL1bQWeaBSnzsAAPjx7j7v0o856.jpg "title=" 1.jpg " Width= "730" height= "399" border= "0" hspace= "0" vspace= "0" style= "WIDTH:730PX;HEIGHT:399PX;" alt= " Wkiol1bqweabsnzsaapjx7j7v0o856.jpg "/>

1.2 get download link for 163 Source :Http://mirrors.163.com/.help/CentOS6-Base-163.repo , you can download the yum source file locally and then upload it to the system, or you can use the wget command to download it directly in the system , followed by the use of wget in the system. Download

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7C/74/wKioL1bQWiXwd0fAAARdQJnLNCI329.jpg "style=" width : 730px;height:471px; "title=" 2.jpg "width=" 730 "height=" 471 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiol1bqwixwd0faaardqjnlnci329.jpg "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7C/76/wKiom1bQWbaxjWzfAALgwbVJXq8558.jpg "style=" width : 730px;height:471px; "title=" 3.jpg "width=" 730 "height=" 471 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiom1bqwbaxjwzfaalgwbvjxq8558.jpg "/>


1 . 4 backing up yum sources

Enter directory [[email protected] ~]# cd/etc/yum.repos.d/

view files under directory [[email protected] yum.repos.d]# ls

Centos-base.repo Centos-debuginfo.repo Centos-media.repo Centos-vault.repo

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7C/74/wKioL1bQWm2iMPMgAADpMSZ3GRc349.jpg "title=" 4. JPG "width=" 730 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:730px;height:88px; "alt=" Wkiol1bqwm2impmgaadpmsz3grc349.jpg "/> backup original file the Ori end up with a backup file

[email protected] yum.repos.d]# CP Centos-base.repo Centos-base.repo.ori

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/7C/76/wKiom1bQWi-AZlGKAAESOMD8aos168.jpg "title=" 5.jpg " Width= "730" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:730px;height:82px; "alt=" Wkiom1bqwi-azlgkaaesomd8aos168.jpg "/>

1.5 use wget to download repo(if no wget command is used yum-y Install wget installation)

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

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/7C/74/wKioL1bQWr2SHwRhAAKiB2nD3Uo889.jpg "title=" 6.jpg " Width= "730" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:730px;height:250px; "alt=" Wkiol1bqwr2shwrhaakib2nd3uo889.jpg "/>


1.6 Replace your own yum file with 163 , Press Y to confirm after carriage return

[email protected] yum.repos.d]# CP Centos6-base-163.repo Centos-base.repo Replace file

cp:overwrite ' Centos-base.repo '? y Press y to confirm

[email protected] yum.repos.d]# Cat/etc/yum.repos.d/centos-base.repo View Repo file contents

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M00/7C/76/wKiom1bQWojCiXq-AAMwmUOnoEs805.jpg "title=" 7.jpg " Width= "730" height= "309" border= "0" hspace= "0" vspace= "0" style= "WIDTH:730PX;HEIGHT:309PX;" alt= " Wkiom1bqwojcixq-aamwmuonoes805.jpg "/>


1.7 Use vimdiff to compare differences (if no vimdiff command uses yum-y Install vim installation )

[email protected] yum.repos.d]# Vimdiff Centos-base.repo Centos-base.repo.ori

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/7C/74/wKioL1bQWy3hgG9IAAawEB3ILMs447.jpg "title=" 8.jpg " Width= "730" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:730px;height:440px; "alt=" Wkiol1bqwy3hgg9iaaaweb3ilms447.jpg "/>

1.8 operation completed, can also be downloaded to use other contrast software to see (Install the Download tool Yum - y Install Lrzsz )


This article is from the "Zhao Dongwei Learning record" blog, so be sure to keep this source http://zhaodongwei.blog.51cto.com/4233742/1745444

Centos6.5 replacing the 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.