Wednesday, March 18, 2009

Updating Red Hat/Fedora/CentOS

I just started a class on Linux and the two distributions we're going to be working with primarily are Ubuntu 8.10 and CentOS 5.2. I already am familiar with Ubuntu but CentOS is new to me. CentOS is based off of Red Hat Enterprise Linux (RHEL). RHEL is a for pay Linux solution geared for use by corporations. They only provide installation binaries to their paying subscribers. However, since they are using the Linux kernal, they have to make all of their source code freely available according to the lisence agreement under which Linux is released. Fedora is the is a free Linux distribution which is sponsored by Red Hat, Inc. The CentOS project has taken the source code for RHEL and has made precompiled binaries available freely available, with a few changes to make it their own and to respect Red Hat's lisencing.

Unlike Ubuntu and other Debian based distributions which use apt for managing packages and software, CentOS and other RHEL based distributions use rpm. Rpm has a weakness in that it doesn't handle dependencies terribly well and so there is the yum tool. I got to use yum a bit after I recently installed a CentOS virtual machine on my laptop and had to install all the available updates. This took three steps:
yum check-update
su
yum update
The first command updates the local information about what package versions are available at the package repositories. The second command, su, is the Unix switch user command. Without any options, it assumes you mean root and prompts you for the root password. Sudo works a bit differently in CentOS compared to Ubuntu and I haven't had a chance to explore more into it just yet. The third command compares the installed versions of packages against the versions available in the repositories and, if there are updates available, prompts you to install them.

Another thing I love about Linux: most updates don't require you to reboot after installing them.

Wikipedia articles:
Ubuntu
Debian
CentOS
Fedora
RHEL

No comments:

Post a Comment