First, Introduction
System comes with a limited number of sources, but also foreign sources, the speed is certainly not as domestic. When the network is broken, local sources can be useful. The Rpmforge source is one of the largest sources of legend. Then we'll come up with a local source, domestic source, Rpmforge source.
You can also install an extension source. We'll talk about it below.
Second, the local source configuration
Method:
(Fig. 1)
Experiment:
Vim Centos-dvd.repo
[Dvd]name= Install Dvdbaseurl=file://mntenable=1Gpcheck= 0
Then clear the cache to see:
[email protected] yum.repos.d]# Yum clean allfailed toSetlocale, defaulting to cloaded Plugins:fastestmirror, prioritiescleaning repos:BaseDVD Extras Rpmforge updatescleaning up everythingcleaning up list of fastest mirrors[[email protected] yum.repos.d]# DF-hfilesystem Size used Avail use%mounted on/dev/sda3 18G1.4G 17G8% /Devtmpfs 479M0479M0% /Devtmpfs 489M0489M0%/dev/Shmtmpfs 489M6.8M482M2% /Runtmpfs 489M0489M0%/sys/fs/Cgroup/DEV/SDA1 197M 109M 88M About% /Boottmpfs 98M098M0%/run/user/0/dev/sr04.1G4.1G0 -% /mnt[[email protected] yum.repos.d]# yum Check-updatefailed toSetlocale, defaulting to cloaded Plugins:fastestmirror, prioritiesBase|3.6Kbxx:xx:xxDVD
Then we look at Yum list:
[email protected] yum.repos.d]# Yum list|grep dvdfailed toSetlocale, defaulting to Cdvd+rw-tools.x86_647.1- the. el7Basedvd95.x86_641.4p0-1. EL6.RF Rpmforge dvdauthor.x86_640.6. One-1.2. EL6.RF Rpmforge dvdbackup.x86_640.1.1-1. EL6.RF Rpmforge dvdisaster.x86_640.70.4-1. EL6.RF Rpmforge grub2-efi.x86_641:2.02-0.44. El7.centos DVD IPA-admintools.noarch4.4.0- A. El7.centos DVD libcxgb3.x86_641.3.1-8. EL7 DVD
The process of the experiment was not exactly in accordance with "Figure 1". This means that you can just create a new repos.d file in the/ETC/YUM.REPOS.D directory. Now we follow the same method to add a domestic source.
Third, the domestic yum configuration
First go to the/ETC/YUM.REPOS.D directory, download the domestic source file:
[Email protected] yum.repos.d]# wget http://Mirrors.163.com/.help/centos7-base-163.repo- "/*/wget"
Yum install wget after installing the wget command, complete the download and then LS to see:
[email protected] yum.repos.d]# lscentos-base.repo centos-debuginfo.repo Centos-vault.repo mirrors-rpmforge rpmforge.repocentos-cr.repo centos-media.repo Centos-fasttrack.repo mirrors-rpmforge-extrascentos-dvd.repo centos-sources.repo centos7-base-163. Repo mirrors-rpmforge-testing[[email protected] yum.repos.d]# vim CentOS7
Centos7-base-163.repo:
[Base]name=centos-$releasever-base-163. Com#mirrorlist=http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=osBaseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/gpgcheck=1Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-7#released Updates[updates]name=centos-$releasever-updates-163. Com#mirrorlist=http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=updatesBaseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/gpgcheck=1Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-7#additional Packages that could be Useful[extras]
Discover the source name of Cenos7-base-163.repo and the same as the source name of Centos-base.repo. In this case, we can delete the original source, or rename it, or change the new source to a name. Here we rename the original source:
[[Email protected] yum.repos.d]# mv Centos-base.repo centos-setBase DVD Extras Rpmforge updatescleaning up everything[[email protected] yum.repos.d]# Yum listbase
Look at the base source:
Yum-updateonboot.noarch1.1. to- the. el7BaseYum-utils.noarch1.1. to- the. el7BaseYumi.noarch2.0.7-2. EL6.RF Rpmforge zenity.x86_643.22.0-1. el7Basezlib.i6861.2.7- -. el7Basezlib-devel.i6861.2.7- -. el7Basezlib-Static. i6861.2.7- -. el7Basezlib-Static. x86_641.2.7- -. el7Base
Iv. Configuring the Rpmforge source
My machine is well-equipped, so I'll introduce the process. A friend in question can be in the comment area @ me.
Here is the reference, from:http://blog.csdn.net/lanwu628/article/details/17714885.
Rpmforge is a software repository under the CentOS system with over 10,000 packages that are considered by the CentOS community to be the safest and most stable repositories. The default CentOS source, the software is too small, you can add additional rpmforge. Here the system is CentOS5.7.
1. Install yum-priorities plug-in
Because to add a third-party source, first confirm that the system is installed yum-priorities this plug-in, which is used to ensure the Software warehouse sequencing (priority precedence) when installing software, generally default first from the official base or mirror installation, It is then installed from the software of the Community user contribute and then from the third-party repositories. Of course, this order can be changed by itself, in order to be safe and stable or according to this order.
yum install yum-priorities
2. View/etc/yum/pluginconf.d/priorities.conf file
vim /etc/yum/pluginconf.d/priorities.conf
The confirmation file has the following:
[main]
enabled=1
3. Set/etc/yum.repos.d/centos-base.repo file
Add sequential instruction Priority=n (N from 1 to 99, 1 precedence highest).
vim /etc/yum.repos.d/CentOS-Base.repo
[Base], [updates], [addons], [extras] finally set Priority=1,[centosplus], [contrib] finally set priority=2 separately, other third software source settings priority= N (recommended n>10).
4, install the Rpmforge software Warehouse
To view the system architecture:
uname -i
i386 system execution:
rpm -ivh http://repository.it4i.cz/mirrors/repoforge/redhat/el5/en/i386/rpmforge/RPMS/ rpmforge-release-0.5.3-1.el5.rf.i386.rpm
x86_64 System Execution:
rpm -ivh http://repository.it4i.cz/mirrors/repoforge/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
Download here to note the number of spaces between IVH and HTTP
5. Set/etc/yum.repos.d/rpmforge.repo file
vim /etc/yum.repos.d/rpmforge.repo
[Rpmforge], [Rpmforge-extras], [rpmforge-testing] are finally set priority=11 respectively.
6. Verify that the setting is successful
Perform:
yum check-update
See if you have: Loaded Plugins:fastestmirror, priorities
If you see the above information, it indicates that the Rpmforge installation source and priority configuration are already working.
V. Install the extension source
Installation:
[email protected] yum.repos.d]# Yum install-y epel-release
Check out the/ETC/YUM.REPOS.D directory:
[email protected] yum.repos.d]# lscentos-base.repo.bak centos-media.repo centos7-base-163 . Repo mirrors-rpmforge-extrascentos-cr.repo centos-sources.repo Epel-testing.repo mirrors-rpmforge-testingcentos-dvd.repo centos-vault.repo epel.repo rpmforge.repocentos-debuginfo.repo Centos-fasttrack.repo Mirrors-rpmforge
Found one more Epel.repo. Clear the cache to see if there is a Epel source:
Yum Clean Allyum List
Vi. Summary
Okay, here's where Yum is willing to install and replace the end, or relatively simple. To summarize is to put a. repo file to the/ETC/YUM.REPOS.D directory.
Linux Learning (19) Software Installation and uninstallation (ii) Replace the Yum source