There is more to Red Hat Enterprise Linux 5 (RHEL5) than Xen. I, for one, think people will develop a real taste for YUM (Yellow dog Updater Modified), an automatic update and package installer/remover for RPM systems.
YUM has already been used in the last few Fedora Core releases, but RHEL4 uses the up2date package manager. RHEL5 will use YUM 3.0. Up2date is used as a wrapper around YUM in RHEL5. Third-party code repositories, prepared directories or websites that contain software packages and index files, will also make use of the Anaconda-YUM combination.
Essentially, YUM automatically
Using YUM makes it much easier to maintain groups of machines without having to manually update each one using RPM. Some of its features include:
- Multiple repositories
- Simple config file
- Correct dependency calculation
- Fast operation
- RPM-consistent behavior
- comps.xml group support, including multiple repository groups
- Simple interface
RHEL5 moves the entire stack of tools which install and update software to YUM. This includes everything from the initial install (through Anaconda) to host-based software management tools, like system-config-packages, to even the updating of your system via Red Hat Network (RHN). New functionality will include the ability to use a YUM repository to supplement the packages provided with your in-house software, as well as plugins to provide additional behavior tweaks.
YUM automatically locates and obtains the correct RPM packages from repositories. It frees you from having to manually find and install new applications or updates. You can use one single command to update all system software, or search for new software by specifying criteria.
Keep in mind that it is always useful to keep your packages in a local YUM repository. The advantage of this is that when you install a package, YUM will automatically resolve any dependencies, not only by downloading the necessary packages from the other repositories you might have in you list, but also by using your local repository as a resource for potential dependencies. When installing a package with YUM, you must have already created RPM packages for all your dependences. That way, YUM can resolve all the dependencies. You won't be able to install your package if the dependencies do not exist in the repositories on your list.
Creating your own repository in RHEL5
To install the RPM, you'll need to type this command:
# yum install createrepo
What this will do is put all your customer RPM packages in a directory, where you can then create the necessary metadata that is needed for your local repository. You would do that by running this command:
# createrepo /mnt/fc_local_repo/
Your local YUM repository has been created. Whenever you put in any new RPMs, you'll have to run this command, so that the new repository metadata gets updated. To install an RPM package and all the other packages that it depends on, you only need to run:
# yum install my_package.RPM
To install the package group Myself Database, enter the command:
# yum groupinstall "MySQL Database"
If you need to upgrade the packages for MYSQL: # yum groupupdate "MySQL Database"
To search for packages which provide for Mail Transfer Agents (MTAs), or that have MTA in the name:
# yum provides MTA
Let's say we want to update our entire system. It's as simple as typing:
# yum update
To activate automatic daily updates:
/sbin/chkconfig --level 345 yum on; /sbin/service yum start
Configuring access to repositories in RHEL5
To add an extra repository, place a definition file in the /etc/yum.repos.d/ directory on your system. Package providers make the definition files for their repositories available on their websites. You must have root access to add a file to the definitions directory. To copy the definition file example.repo, type this command:
# cp example.repo /etc/yum.repos.d/
The configuration file for each repository should include a gpgkey setting. This setting specifies the location of a public key that verifies the packages provided by that repository. This public key is automatically imported the first time that you install software from the repository.
In conclusion, if you have used YUM before, you should have no problem getting used to this
change in RHEL5. If you have not used YUM, once you get passed the initial learning curve, I'm
certain that you will love it.
This was first published in February 2007