How to create a yum source from a CentOS system CD without an external network, resulting in RPM packet dependency issues

Source: Internet
Author: User

How to do this in the absence of an external networkCentosSystem Disc CreationYumSource, ResultsRpmPacket Dependency Issues

believe that as Linux System administrators will encounter software dependencies more or less during the installation of RPM packages. Usually our workaround:

1. Install the Yum server on the extranet via the Yum tool to automatically help resolve the soft armor dependency.

This method can solve the software dependence problem quickly, but the precondition is that there is the outer light in the production environment. If our production environment is not allowed to connect or have no external network conditions, there is basically no way to solve.

2. Install the dependency software manually. This method is more primitive installation method, only suitable for less software-dependent situation, if the software installed depends on more software, and so you put the software installed, it is estimated that the yellow vegetable is cold

3. There is really no other way, only to come to a simple and rude way, reinstall the system, the required software in the custom system when all installed. If you really use this method, I can only in the heart silently despise you.

how to direct the door to encounter problems? Very simple, just by changing the Yum -related configuration. Work with the system disk as a yum source.

How Yum works

Yum Operating principle

Yum work requires two parts to co-operate, in part Yum server, and there is Client of the Yum tools. Here are two parts of how it works.

    • Yum Server

all the issues to be releasedrpmpackages are placed inYumon the server to provide others to download,rpmpackage based onKernelThe version number,CPUversion numbers are compiled and published separately. Yumas long as the server provides a simple download, you canFTPorhttpdthe form can be. Yumone of the most important aspects of a server is to sort out eachrpmbasic information about the package, includingrpmpackage corresponds to the version number,conffiles,binaryinformation, as well as critical dependency information. In theYumavailable on the serverCreaterepotool for puttingrpmthe basic profile of the package is made into a single"Checklist", this one"Checklist""is to describe eachrpmPackage ofSpecthe information in the file.

    • Yum Client End

Clienteach callYum InstallorSearch, I will parse it./etc/yum.repos.dmdirectory below all the. Repoend of the configuration file that specifies theYumthe address of the server. Yumwill go regularly"Update"Yumon the serverrpmPackage"Checklist", and then put"Checklist"Download Save toYumof their ownCacheinside, according to/etc/yum.confin the configuration(the default is/var/cache/yumbelow), each callYumIt's going to be this when we pack.Cachedirectory down to find"Checklist", according to"Checklist"in therpmPackage Description Thus to determine the name of the installation package, the version number, the required dependencies, etc., and then go toYumServer DownloadrpmPackage installation. (The premise is that there is norpmPackage ofcache)

Note: Interested friends can have a deeper understanding ofBuildYumServer

through Yum working principle can be known that the client through the development of the Yum Server to access and download dependent software. Can we specify the local yum Source as the local address and resolve the software dependencies by invoking local resources? The answer is yes.

Solution Ideas:

Centos The system disk comes with all preinstalled software, let yum Call the package resource in the system disk to replace the remote server's functionality.

Yum by calling Yum rpm Dependency package, we can mount the system disk through yum The configuration file changes the server address to the mounted system disk directory. Of course, if you have the conditions, you can build an internal yum server, can resolve multiple servers rpm software dependency problem, you can save a lot of time.

configuration method:

1.   /ETC/YUM.REPOS.D centos-media.repo other files. yum The server configuration is fairly documented in the. Although you can use other documents, let yum access the local directory, but discover it through the actual operation. Although the configuration, but the update will still be error, so it is recommended that you now back up, and then remove the need not to configure the document to operate.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5D/D8/wKiom1UlF63BGoj2AADyx6pCwXI529.jpg "title=" 1.PNG " alt= "Wkiom1ulf63bgoj2aadyx6pcwxi529.jpg"/>

2. Configure centos-media.repo. The default configuration document is as follows, we need the parameter "enable=0" change Ask "enable=1", enable the document.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5D/D8/wKiom1UlF7mTopkeAAIkGmKR18I206.jpg "title=" 2.PNG " alt= "Wkiom1ulf7mtopkeaaikgmkr18i206.jpg"/>

3. mount the system disk to the configuration directory, we know the configuration document directory has /media/centos, we can attach the system CD to the directory. Specific how to mount, here do not do a detailed introduction.

4. After the configuration of the above steps, you can install the software, but it is important to note that we need to install the software on the CD to operate, or the system is not prompted to find. After all, we are just making the relevant resource path, not building a yum server.


This article is from the "Mr. Koala" blog, please make sure to keep this source http://koala003.blog.51cto.com/9996246/1630149

How to create a yum source from a CentOS system CD without an external network, resulting in RPM packet dependency issues

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.