Tuesday, April 11, 2006
YUM
Yum is an automatic updater and package management tool for rpm based systems. Yum automatically computes dependencies and figures out what steps need to occur in order to install packages. It makes it much easier to maintain groups of machines without having to manually update each one using rpm.
Yum can be used in place of, or in addition to the Red Hat up2date and rpm tools which also come with/from Fedora Core 1. My personal preference is to use Yum as a complete replacement for both tools as it has proven to be faster, more reliable, and also offers functionality not available when using the other tools such as;
* Multiple Repositories
* Simple Configuration File
* Correct Dependency Calculation
* rpm-consistant behavior
* comps.xml group support, including multiple repository groups
* Simple interface
Originally created by Terra Soft, "yup" (Yellow Dog Updater) was improved and is now maintained by Linux@Duke team at Duke University, becoming yum (Yellow Dog Updater, Modified). yum now ships with Red Hat and works with Fedora, Mandrake, and of course Yellow Dog Linux and Y-HPC.
Yum can not only be used to keep packages already installed on your system updated, but can also be used to install packages directly, which is awesome on those days when you can't find a cd to save your life. Yes, you could always download the sourceball, or go looking for an rpm on the net, but this is soooo much simpler. Yum is developed and maintained through the hard work of the folks at Duke University and is made available to the rest of us under the GNU GPL.
Configuring Yum -
Before using Yum we need to modify its configuration file which is called yum.conf and edit the lines which tell Yum which repository server to use. Now using your favorite text editor open the /etc/yum.conf file and edit it as follows replacing the baseurl line with the address of the repository you chose. In this example we are using the mirror site mirrors.kernel.org.
[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://mirrors.kernel.org/fedora/core/$releasever/$basearch/os
[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
baseurl=http://mirrors.kernel.org/fedora/core/updates/$releasever/$basearch
Need to worry about the [updates-testing] portion of this file as it is not used for general updates and package installation. Edit the /etc/sysconfig/rhn/sources file as follows, again, substitue as needed with the mirror site you have chosen.
yum fedora-core-1 http://mirrors.kernel.org/fedora/core/1/i386/os
yum updates-released http://mirrors.kernel.org/fedora/core/updates/1/i386
Cool, that change insures that the Redhat tools work as well. Thats it, save the file and close it and lets move on.
Using Yum -
Commonly used Yum commands include:
# yum check-update
Will tell you what updates are available and applicable to your system.
# yum update
To update all existing packages on your system.
# yum install
To install a package.
# yum clean all
To remove any old cached packages and headers from your system. See the yum man page for more information.
Yum can be used in place of, or in addition to the Red Hat up2date and rpm tools which also come with/from Fedora Core 1. My personal preference is to use Yum as a complete replacement for both tools as it has proven to be faster, more reliable, and also offers functionality not available when using the other tools such as;
* Multiple Repositories
* Simple Configuration File
* Correct Dependency Calculation
* rpm-consistant behavior
* comps.xml group support, including multiple repository groups
* Simple interface
Originally created by Terra Soft, "yup" (Yellow Dog Updater) was improved and is now maintained by Linux@Duke team at Duke University, becoming yum (Yellow Dog Updater, Modified). yum now ships with Red Hat and works with Fedora, Mandrake, and of course Yellow Dog Linux and Y-HPC.
Yum can not only be used to keep packages already installed on your system updated, but can also be used to install packages directly, which is awesome on those days when you can't find a cd to save your life. Yes, you could always download the sourceball, or go looking for an rpm on the net, but this is soooo much simpler. Yum is developed and maintained through the hard work of the folks at Duke University and is made available to the rest of us under the GNU GPL.
Configuring Yum -
Before using Yum we need to modify its configuration file which is called yum.conf and edit the lines which tell Yum which repository server to use. Now using your favorite text editor open the /etc/yum.conf file and edit it as follows replacing the baseurl line with the address of the repository you chose. In this example we are using the mirror site mirrors.kernel.org.
[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://mirrors.kernel.org/fedora/core/$releasever/$basearch/os
[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
baseurl=http://mirrors.kernel.org/fedora/core/updates/$releasever/$basearch
Need to worry about the [updates-testing] portion of this file as it is not used for general updates and package installation. Edit the /etc/sysconfig/rhn/sources file as follows, again, substitue as needed with the mirror site you have chosen.
yum fedora-core-1 http://mirrors.kernel.org/fedora/core/1/i386/os
yum updates-released http://mirrors.kernel.org/fedora/core/updates/1/i386
Cool, that change insures that the Redhat tools work as well. Thats it, save the file and close it and lets move on.
Using Yum -
Commonly used Yum commands include:
# yum check-update
Will tell you what updates are available and applicable to your system.
# yum update
To update all existing packages on your system.
# yum install
To install a package.
# yum clean all
To remove any old cached packages and headers from your system. See the yum man page for more information.

