yum源自定义优先级,提高下载速速!
01、Install Yum Priorities
- Run the Yum Priorities install command
yum install yum-priorities
02、Configure Yum Priorities
- Open the Yum Priorities configuration file
/etc/yum/pluginconf.d/priorities.conf- Ensure the following lines exist
[main]
enabled=1 - Save and close the file
- Ensure the following lines exist
- Open the CentOS base repository configuration file
/etc/yum.repos.d/CentOS-Base.repo - Add the following text to the end of the Base, Updates, Addons, and Extras repository entries*
priority=1 #优先级高于2,越小优先级越高 - Add the following text to the end of the CentOSPlus repository entry*
priority=2
借鉴:http://cnzhx.net/blog/yum-priorities/