Every time I work on YUM, I can visualize this picture, Yamdoot - the messenger of death. Haha...
The Yellowdog Updater, Modified (YUM) is an open-source command-line package-management utility for RPM-compatible Linux operating systems. Many times a user want's to install a particular version of RPM or upgrade an existing RPM installation, but this may not be as simple as just installing a .rpm file. This may require resolving the dependencies of a RPM and then deploying the actual RPM. Inorder to avoid this mess, one can use YUM tool/command.
Lot of RPM packages come bundled with the CD/DVD or ISO image. We can point the yum tool to the mounted CD/DVD/ISO image and let it figure out the required dependencies and installation of required RPMs.
Here's and example of dependencies:
Loaded plugins: product-id, refresh-packagekit, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
--> Running transaction check
---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed
---> Package pam.i686 0:1.1.1-8.el6 will be installed
--> Processing Dependency: libcrack.so.2 for package: pam-1.1.1-8.el6.i686
--> Processing Dependency: libaudit.so.1 for package: pam-1.1.1-8.el6.i686
--> Processing Dependency: libselinux.so.1 for package: pam-1.1.1-8.el6.i686
--> Running transaction check
---> Package audit-libs.i686 0:2.1-5.el6 will be installed
---> Package cracklib.i686 0:2.8.16-4.el6 will be installed
---> Package libselinux.i686 0:2.0.94-5.el6 will be installed
--> Finished Dependency Resolution
Package Arch Version Repository
compat-libstdc++-33 x86_64 3.2.3-69.el6 cd 183 k
pam i686 1.1.1-8.el6 cd 659 k
Installing for dependencies:
audit-libs i686 2.1-5.el6 cd 58 k
cracklib i686 2.8.16-4.el6 cd 70 k
libselinux i686 2.0.94-5.el6 cd 107 k
Install 5 Package(s)
Total download size: 1.1 M
Installed size: 3.3 M
Is this ok [y/N]:
First make sure that the installation media is available. If you installed from a CD/DVD then reinserting the media in the drive should result in it being mounted automatically.
If you are using vmware or other virtualization technology, mounting the media or iso should have the same effect. If it does not, it will be necessary to manually mount the media. You should be able to use a command like:
To verify the location of the installation media with the device mounted, run the command
/dev/sr0 3516418 3516418 0 100% /media/RHEL_6.1 x86_64 Disc 1
To allow yum to use the media as a repository for installation you will need to add configuration info to yum pointing to the install media. Use the following command:
baseurl=file:"///media/RHEL_6.1 x86_64 Disc 1"
command line prompt type:
Now cd to the packages directory and install the required package/RPM.
# yum install compat-libstdc++-33 pam.i686
Yum will perform a pre-requisites check and ask you if you want to proceed with the install of the package and any prerequisites. You should enter y to continue. When the install has complete you will get a message to that effect.