1. Configure the local Yum source function
There are two ways to install software under Linux:
one is the rpm command, and the other is Yum online installation.
because the rpm command installs and uninstalls the software, there are many dependencies that may arise, and in order to resolve these dependencies, we tend to spend a lot of time and effort. So, in order to make our operation more convenient, the way Yum installs and uninstalls online has become our first choice when installing and uninstalling software, which is one of the most common ways of loading and unloading software for Linux at present.
2. Local Yum Source Configuration
for non-networked For Linux operating system clients, in order to be able to install the software using the Yum command, we need to first build the Yum source locally.
Next, let's take a look at how to build a local yum source!
The first step: Mount The Linux installation image file
Open the virtual machine settings, and click "Browse" to start loading our image files
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/8A/E3/wKioL1g-jUKA_OuSAAIfQVDbJoc759.png-wh_500x0-wm_3 -wmp_4-s_2872528044.png "title=" image 1.png "alt=" Wkiol1g-juka_ousaaifqvdbjoc759.png-wh_50 "/>
set up mount point:mkdir/mnt/cdrom
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8A/E3/wKioL1g-jXOy8o2lAAB53KqM15Y510.png-wh_500x0-wm_3 -wmp_4-s_2499712932.png "title=" image 2.png "alt=" Wkiol1g-jxoy8o2laab53kqm15y510.png-wh_50 "/>
enter mount command in character interface:Mount/dev/sr0/mnt/cdrom
If prompted, the mount is complete:
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/8A/E7/wKiom1g-jZ2gd3THAAB0lSOBkyk534.png-wh_500x0-wm_3 -wmp_4-s_1023016359.png "title=" image 3.png "alt=" Wkiom1g-jz2gd3thaab0lsobkyk534.png-wh_50 "/>
Step Two: Modifying the Yum source file
(1) Enter command CD/ETC/YUM.REPOS.D find Yum Source configuration file
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8A/E7/wKiom1g-jcLRJprFAAB5sPQ3rvY185.png-wh_500x0-wm_3 -wmp_4-s_2814797590.png "title=" image 4.png "alt=" Wkiom1g-jclrjprfaab5spq3rvy185.png-wh_50 "/>
(2) invalidating the network yum Source
input Command mv Centos-base.repo Centos-base.repo.bak, give a name to the network Yum source file to invalidate it:
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/8A/E7/wKiom1g-jeryvG1NAAB8uzapNaA445.png-wh_500x0-wm_3 -wmp_4-s_3091647129.png "title=" image 5.png "alt=" Wkiom1g-jeryvg1naab8uzapnaa445.png-wh_50 "/>
(2) make the disc Yum source effective
Configure the CD yum source file (Centos-media.repo), modify the method:
input Command vi centos-media.repo edit disc yum source file
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/8A/E7/wKiom1g-jguCaQyVAACbLqmovvA213.png-wh_500x0-wm_3 -wmp_4-s_1511522419.png "title=" image 6.png "alt=" Wkiom1g-jgucaqyvaacblqmovva213.png-wh_50 "/>
After the instructions have been modified, save the rollout.
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/8A/E7/wKiom1g-jirQ5YTjAACU5QIZknY843.png-wh_500x0-wm_3 -wmp_4-s_1944462671.png "title=" image 7.png "alt=" Wkiom1g-jirq5ytjaacu5qizkny843.png-wh_50 "/>
(2) See if the local Yum source is built
input command:The Yum list interface indicates that the local Yum source was successfully built
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8A/E7/wKiom1g-jlOQA2RmAACPHGZgTL4271.png-wh_500x0-wm_3 -wmp_4-s_3304179375.png "title=" image 8.png "alt=" Wkiom1g-jloqa2rmaacphgzgtl4271.png-wh_50 "/>
OK, very simple!
This article is from the "Brother Hong Linux World" blog, so be sure to keep this source http://zhengkangkang.blog.51cto.com/12015643/1878210
How to build a local Yum source in Linux