This article takes CentOS 7 as the subject. There may be some deviations from other versions of Linux.
First: the index file.
1) Repo file.
A 1.repo file refers to a file that ends with repo. is the index file for the warehouse source. Add it to the Yum repo repository and Yum can find the software from the source.
2.repo file path:/etc/yum.repos.d/
3. This kind of source is typical: 163, Sohu and so on. Unfortunately, these sources have not been added successfully to date.
4. suspicion is exclusive. All posts indicate the need to replace the original Base.repo.
2) RPM Package
1.RPM package, need to use RPM to install. After installation, there is a corresponding repo in the /etc/yum.repos.d/
2. It remains essentially repo. But the encapsulation was carried out. do not understand why, perhaps the historical reasons?
3. Such sources are: Rpmfunsion,rpmforge.
4. It has been determined that these sources do not require manual replacement of Base.repo. but did you make a stealth change?
Second: Some of the commonly used source sites.
1) Popular websites:
1.163: Http://mirrors.163.com/.help/CentOS6-Base-163.repo
2.sohu:http://mirrors.sohu.com/help/centos-base-sohu.repo
3.rpmfunsion: http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
2) The source warehouse has timeliness : the community or company that maintains the warehouse may change some paths. It is expected that the above 3 URLs may not be downloaded directly.
1. However, the home page generally does not change. First step: Find the homepage.
2. File paths generally follow their own rules. Step two: Determine the path
3. The file name usually has a certain rule. Step three: Determine the approximate file.
4. There is not much understanding of this rule for the time being. So you need to solve them by themselves.
Third: Installation
1) Repo installation method: in the test. The individual did not succeed. But there are no cases on the Internet.
2) RPM Installation method:
1. If you have not installed it, you need to add a key. Use of key: Activates the RPM function. Instruction: RPM--import. The KEY name is typically: Rpm-gpg-key-centos in this format.
2. Use the RPM-IVH/RPM-UVH to install.
IV: Summary.
1) Locate the file.
2) (repo) Import the file to the corresponding path. (RPM) Locate the key and install it.
3) Replace the Base-repo.
Yum adds a source.