System environment: CentOS 6.7 Environment, vmwareworkstation virtual machine software
Yum Source: Domestic Yum Source 163
We all know that using Yum can easily install some of the most commonly used software. and a lot of RPM packages need to manually solve the dependency problem when installing, it is very laborious for beginners. The use of yum installs automatically resolves dependency issues. Words are not the majority. Let's get down to the chase.
The CentOS system can be used directly with its own free yum source. There is no need to change or get authorization. Because the source for using CentOS is free, you do not need to be licensed to use it.
But try to use the domestic yum source to compare download speed faster.
First, you need to ensure that Linux is networked. You can configure the DNS service. Edit the./etc/resolv.conf file to write to the frequently used domestic faster DNS server address. such as Baidu's 180.76.76.76 or Ali's public DNS address. 223.5.5.5 or 223.6.6.6, etc.
Then ping tests the extranet connectivity.
Modify the Yum configuration file. Before revising, it is the basic professional quality of an operation and maintenance personnel.
Cp/etc/yum.repos.d/centos-base.repo/centos-base.repo.bak
Download the file Centos-base.repo or Centos-base.repo file to the Ali or 163 mirror website.
Ari Address: http://mirrors.aliyun.com/
NetEase Mirror Station: http://mirrors.163.com/
Select the appropriate Help file after you have found the CentOS system after entering the website. I found this repo file. Download to a local or direct wget download to Linux.
Then put it in the directory where Yum corresponds.
The final step is to clean up the old cache file. Yum clean all. Then cache the files locally. Yum Makecache.
It takes a few minutes to download time to the local, and then download it directly from 163 or Ali, much faster.
Yum Common commands
-
1. Lists all updatable software inventory commands: Yum check-update
-
2. Update all software commands: Yum update
-
3. Install only the specified software commands: Yum install <package_name>
-
4. Update only the specified software commands: Yum update <package_name>
-
5. Lists all the software inventory commands that can be installed: Yum list
-
6. Remove Package Command: Yum remove <package_name>
-
7. Find Package Command: Yum search <keyword>
-
8. Clear Cache command:
-
Yum Clean packages: Clear packages under cache directory
-
Yum Clean headers: Clear headers
-
Yum clean oldheaders: Clear cache directory Old Head ERs
-
Yum clean, yum clear all (= Yum packages; yum oldheaders): Clears packages under cache directory and old headers
Besides NetEase, there are other good sources of Yum in China, such as Zhong Ke and Sohu.
Zhong ke yum Source, installation method view: Https://lug.ustc.edu.cn/wiki/mirrors/help/centos
Sohu Yum Source Installation method view: http://mirrors.sohu.com/help/centos.html
This article is from the "Star Moon Love" blog, please be sure to keep this source http://xuegodxingyue.blog.51cto.com/5989753/1937261
Ways to use Yum sources and replace domestic yum under Linux