Sunday, January 4, 2009

Yum

Yum is one of the newer methods of software management on Linux systems. It is basically a wrapper program for RPM, with great enhancements. It has been around for a while, but it has become more widely used and more prominent because major Linux vendors decided to concentrate on their (more profitable) commercial product offerings. Yum has changed and enhanced the traditional approach to package management on RPM-based systems. Popular large sites that serve as repositories for open source software have had to retool slightly to accommodate “Yumified” repositories. According to the Yum project’s web page: “Yum is an automatic updater and package installer/remover for RPM systems.

It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using RPM.”

This summary is an understatement. Yum can do a lot beyond that. There are certain new Linux distributions that rely heavily on the capabilities provided by Yum. Using Yum is simple on supported systems. You mostly need a single configuration file (/etc/yum.conf). Other configuration files may be stored under the /etc/yum.repos.d/directory that points to the Yum-enabled (Yumified) software repository. Fortunately, several Linux distributions now ship with Yum already installed and preconfigured. Fedora is one of these distros. To use Yum on a Fedora system (or any other Red Hat–like distro)—to install a package called gcc, for example—at the command line, you would type

[root@fedora-serverA ~]# yum install gcc

Yum will automatically take care of any dependencies that the package might need and install the package for you. (The first time it is run, it will build up its local cache.) Yum will even do your dishes for you (your mileage may vary). Yum also has extensive search capabilities that will help you find a package, even if you don’t know its correct name. All you need to know is part of the name. For example, if you wanted to search for all packages that have the word “headers” in the name, you can try a Yum option like this:

[root@fedora-serverA ~]# yum search headers

This will return a long list of matches. You can then look through the list and pick the package you want.

By default, Yum tries to access repositories that are located somewhere on the Internet. Therefore, your system needs to be able to access the Internet to use Yum in its default state. You can also create your own local software repository on the local file system or on your local area network (LAN) and Yumify it. Simply copy the entire contents of the distribution media (DVD/CD) somewhere and run the yum-arch command against the directory location

Source of Information : McGraw Hill Osborne Media Linux Administration A Beginners Guide Fifth Edition

No comments: