In centos or RHEL system environment, rpm
Dependency is a headache. After each system installation is complete, I want to install another software package. Before I press the Enter key, I am scared to jump out of a dependency error. Behind a dependency error, more dependencies may be involved. This problem causes many problems.
Linux users are daunting.
The dependency of the RPM package is simple because the so-called dependency is just a simple one. to install a, you must prepare A1, A2, and,
A3.
For example, when we install GCC. Find the installation disc, carefully mount it, and find the gcc-4.1.2-50.el5.i386.rpm to try to use
Rpm
-IVH gcc-4.1.2-50.el5.i386.rpm
. The system tells us that glibc-devel and libgomp are missing. When you try to install
Glibc-devel, and the system prompts that glibc-headers is missing. Continue and find the lack of kernel-headers. I was so worried that it would be nice if I had chosen to install it completely! At the same time, I also complained about how Linux is so difficult to use. How nice it would be if I had been running next in windows! Finally, according to the dependency prompt, the GCC is recursively completed.
. I am glad to have completed this task. In fact, this installation task is not complex enough to scare us away.
I strongly recommend Yum!
Yum's RPM package processing is a typical "space for Time" process. By preprocessing all RPM packages in the source, an index is generated for all installation packages, including files, dependencies, conflicts, and other information.
SQLite format is stored in the directory corresponding to/var/Cache/yum.
Use a DVD to create a local Yum Source
Since Yum has effectively solved the RPM package dependency problem, the speed problem should be solved. The access speed of the local optical drive is even faster than 100 MB.
Local Area Network (LAN). In some recently released installation disks, the repo information has been preset and stored in the directory named repodata. The installation disk is a ready-made Yum source. In
Multiple repo are preset in centos5 and placed in the/etc/yum. Repos. d directory;
First, attach the CD to the optical drive and attach the CD.
# Mount/dev/HDC/Media/CDROM
Mount: block device/dev/HDC is write-protected, mounting read-only
Centos 5.6 can be automatically mounted, so you do not need to create a cdrom folder to mount the DVD, you can directly use centos_5.6_final
If an image is installed locally, it is mounted to the corresponding directory through loop.
# Mount-o loop CentOS-5.6-i386-bin-DVD.iso/Media/CDROM
Then, edit the yum source configuration file and add a local Yum source. Here is a centos 5.6 DVD installation disk. Its repo corresponds to the DVD. Repo
If it is a RHEL server, the corresponding baseurl is
Baseurl = file: // media/CDROM/Server
Or create a new DVD. Repo directly in the/etc/yum. Repos. d directory.
Open it with VI and write the following class content:
[DVD]
Name = install centos DVD
Baseurl = file: // media/CDROM
Enable = 1
Gpgcheck = 0
After the local source configuration is complete, you can use Yum to complete the RPM package. First, check the configured Yum source.
Yum list
Then, install the software package through the well-known Yum install. From the output information, we can see that Yum will help us process the RPM
Package dependency. At the same time, because the packages are all local, the download time is almost negligible.