First introduce yum, an installation package management tool based on the VPM installation package
"1" Yum is an interactive, RPM based, Packagemanager can solve the dependency between packages and packages
"2" RPM-IVH Software Installation command does not resolve dependencies
In the Yum configuration file, the address of the software download is the address of the update source this address is the address that we use to download the software when we use Yum for software installation by default this address is a foreign mirror address mirror.centos.org/
But at home if you also use a foreign mirror address may be slower then we can consider using the domestic image update address mirrors.163.com/
1 How to configure Yum sources
1 Landing mirrors.163.com/ Find CentOS Help
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6D/C1/wKioL1VrG1iia4UIAAPvkJiZ2zM334.jpg "title=" 1.jpg " alt= "Wkiol1vrg1iia4uiaapvkjiz2zm334.jpg"/>
2 found CentOS6
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6D/C5/wKiom1VrGfyxmwJfAACAkzEy_dQ867.jpg "title=" 2.jpg " alt= "Wkiom1vrgfyxmwjfaacakzey_dq867.jpg"/>
3 Click Get or download directly and upload to Linux system
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6D/C1/wKioL1VrG8CjH0RkAAEa-C7oouY068.jpg "title=" 4.jpg " alt= "Wkiol1vrg8cjh0rkaaea-c7oouy068.jpg"/>
here to get Http://mirrors.163.com/.help/CentOS6-Base-163.repo
4 Download Yum configuration files under Linux
"1" Enter the Yum Directory
[[Email protected] ~] #cd/etc/yum.repos.d/[[email protected]]# Lscentos-base.repo Centos-debuginfo.repo Centos-media.repo Centos-vault.repo
As you can see here, Centos-base.repo is the Yum profile that is currently in use and we can change it directly with vim, but this method rarely changes the new repo file directly.
"2" Backup Centos-base.repo
[Email protected]]# cp Centos-base.repo Centos-base.repo.ori #可使用mv [[email protected] yum.repos.d]# Lscentos-base.rep o Centos-debuginfo.repo centos-vault.repocentos-base.repo.ori Centos-media.repo
You can also use the MV command to make a backup, but there will be no Centos-base.repo file at this time and there is only Centos-base.repo.ori file. The purpose of making a backup before modifying it here
1. There is a problem rolling back
2. later than the content of the changed
"3" Download the new repo file from the 163 mirror site
[[email protected]]# wget http://mirrors.163.com/.help/ centos6-base-163.repo--2015-05-2015:14:31-- http://mirrors.163.com/.help/ centos6-base-163.reporesolvingmirrors.163.com... 123.58.173.186, 123.58.173.185connecting Tomirrors.163.com|123.58.173.186|:80... connected. http requestsent, awaiting response... 200 oklength: 2006 (2.0K) [ Application/octet-stream]saving to:acentos6-base-163.repoa100%[======================================> ]2,006 --.-k/s in 0s 2015-05-2015:14:31 (123 mb/s) - acentos6-base-163.repoa saved[2006/2006][[email protected]]# lsCentOS6-Base-163.repo CentOS-Base.repo.ori centos-media.repocentos-base.repo centos-debuginfo.repo Centos-vault.repo
You can see that there are more Centos6-base-163.repo files at this time. This is the repo file that was downloaded from the 163 mirror site.
"4" Changes the newly downloaded repo file to the Yum profile currently in use
[Email protected]]# cp centos6-base-163.repo centos-base.repocp:overwrite ' Centos-base.repo '? Y
The update source for Yum is now successfully configured.
You can use the sz-y centos-base.repo centos-base.repo.ori command to download before and after two Yum profiles and then use the Text Comparison tool to compare the differences will find just the change.
In a production environment, you can configure a Yum repository that belongs to your own enterprise or server.
When the configuration of the Yum update source is complete, you can install some software through the Yum tool to test the connection to the update source and download speed If you are not satisfied with the download speed of this update source, you may consider replacing the update source for the domestic update source is not the only way to find out.
This article is from the "fragrant fluttering leaves" blog, please make sure to keep this source http://xpleaf.blog.51cto.com/9315560/1656955
Configuration and use of the Yum update source for "Linux system optimization"