Installing CentOS 5 "Debian Style"
If one knows of the hype about Ubuntu, and it is almost unavoidable, one is led to believe that it is the most popular Linux distribution for desktop users. I have yet to see hard data that shows evidence of that claim so that will remain unresolved for now. One of the reasons touted for Ubuntu's popularity is that it comes on a single CD. Debian, upon which Ubuntu is based, also has fans because it too has a very light-weight install option (among other reasons) which will install the base system and allow one to install all the desired software post-install by downloading only what is needed. While Debian is huge, 27 CDs for the full distro or 3 DVDs (not counting the source CDs), virtually no one downloads all of the
Since I'm a Red Hat fan (which includes Fedora Core and CentOS), I'm aware of the complaints people have about "having to download multiple CDs" before they can start installing. In fact, the recently released CentOS 5 is 6 CDs (
i386, or 7 CDs for
x86_64). To counter those complaints, I thought I'd try a single CD install of the recently released CentOS 5 "Debian style" and then add everything in post-install. Join me if you will...
Insert CD 1 and boot
The goal of this exercise is to do a minimal install using CD 1 only, and then post-install, install a fairly full desktop system including GNOME, KDE, graphical Internet applications, text Internet applications, utilities, development tools... you name it. This is not a HOWTO so I WILL NOT be going through every single step. The install process of Red Hat based distros is so easy now, a chicken could almost do it by pecking the enter key on the keyboard.
The default package selection for CentOS 5 is basically a GNOME based desktop environment with OpenOffice.org and several common graphical Internet applications... and this default install actually requires CDs 1-5. If you don't want the default install, you have to manually select "Customize now" at the bottom of the installation type screen... which will take you to a package selection screen. While previous releases had options for "Install everything" and "Minimal install" at the bottom of the package list, the package selection screen has been completely redesigned. With the addition of Virtualization, Clustering, and Cluster Storage options, the "Install everything" option no longer makes much sense... but it is unfortunate that the "Minimal install" option isn't there anymore. With this release they have also added the option to include additional, network-based package repositories if desired.
So, without a "Minimal install" option, just how does one accomplish a minimal install? It isn't too difficult. You just have to select each package group on the left side of the screen and make sure to remove all checkmarks in the sub-groups on the right. This means you have to do a bit of clicking... by working through each section and removing all checkmarks. When I say remove all check marks, I mean it... with the exception of "Base" in the "Base System" group... although for an even lighter-weight install, you can even remove that checkmark too.
All about the dependencies
After making your package selections, or in this case, de-selections, clicking Next will produce a pop that says, "Checking dependencies in packages selected for installation...". If you were successful at unchecking every package group and sub-group, you will be rewarded by the installer not even telling you how many CDs are needed.
A typical minimal install takes 5 minutes or so... with more time spent entering information on the various screens rather than in package installation. If you left "Base" checked, it equals 340 rpms taking up 881MB of disk space. If you didn't leave "Base" checked, it equals 144 rpms taking up 616MB of disk space.
Ok, the install is done and system rebooted. The grub menu comes up, the kernel boots, and shortly thereafter you are presented with the console login screen. You login and the command prompt blinks at you with anticipation. What do you do now? Remember, the goal of this experiment was to end up with a GUI desktop with everything... GNOME, KDE, GUI apps, Development tools, etc.
yum stands for Yellowdog Updater Modified... and it is the higher-level package management tool offered by most Red Hat based distros these days. By higher-level I mean that when you want to install something,
yum figures out all of the dependencies and downloads everything for you. In contrast to
yum is the venerable
rpm command. Debian and/or Ubuntu users can relate as follows...
rpm is to
dpkg is to
yum is typically used to install one or more packages by name... but it has lesser used package group functionality as well. Want to know what groups are available? Then try:
From a minimal install you should get something like:
Dialup Networking Support
Engineering and Scientific
GNOME Software Development
X Software Development
Legacy Network Server
DNS Name Server
GNOME Desktop Environment
Authoring and Publishing
Games and Entertainment
Legacy Software Development
Legacy Software Support
X Window System
Windows File Server
KDE Software Development
KDE (K Desktop Environment)
Server Configuration Tools
Sound and Video
FreeNX and NX
Notice that the vast majority of group names are multiple words with spaces included. As a result, you have to put them in double quotes so the spaces in their names won't be interpreted as separators.
Ok, let's install all of the stuff I want with the following
yum groupinstall \
"Office/Productivity" "Development Libraries" Editors \
"GNOME Software Development" "Text-based Internet" \
"X Software Development" "GNOME Desktop Environment" \
"Games and Entertainment" "Legacy Software Development" \
Java "Java Development" Emacs "Legacy Software Support" \
"X Window System" Graphics Ruby "Printing Support" \
"KDE Software Development" "KDE (K Desktop Environment)" \
"Sound and Video" "Administration Tools" "Development Tools" \
Please note that is really one line but the \ has been used to separate it across multiple lines for readability. \ in shell syntax means continued on next line.
After doing that,
yum spewed out a lot of text, figured out all of the dependencies and gave me a transaction summary that said it was going to install 688 packages, update 4 packages and remove 0 packages with a total download size of 904MB. Depending on updates and whether or not you had "Base" selected in the initial install (I did), the exact figures may vary but you get the point. Luckily I setup my own package repositories so downloading all of this stuff over the LAN was probably faster than having all of the physical CDs or the DVD. This article isn't intended to be a HOWTO so install what you want rather than what I've specified above.
It will take a while but after it is all said and done, everything will be there all happy like.
Why would you want to do it this way?
As time goes on, there are going to be more and more package updates. Installing this way lets you do a minimal install which will require a minimal amount of updates AND all of the packages you install post-install should check updates so it won't install anything that needs updating.
Having local repositories on the LAN really made it fast but I'm not sure I'd like to have to download 904MB of packages over the greater Internet... although in most cases it shouldn't be a problem... although on the same day or week of a new distro release it might be problematic.
I guess I'm just old fashioned. I like to download the whole distro and pick all of the stuff I want to install during the install. Sure that means a lot of updates but RHEL/CentOS do release updated install media (aka respins) as minor versions of the distro and as long as you have the most recent install media, you shouldn't have too terribly many packages to update... knock on wood. Even with Fedora, that has the rapid 6 month development cycle, there is a group that produces respins every so often to cut down on the number of updates needed after a fresh install.
Draw backs to the minimal install method
If you do a default install or add packages beyond the default install, you'll have a GUI system to begin with... and that includes the
firstboot wizard that runs when you boot for the first time after installation.
firstboot does things for you like configuring X, adding a user account, setting up a firewall, configuring your sound card, etc. With a minimal install you don't get that
firstboot experience so you'll have a little work ahead of you after everything is installed. Luckily there are packages that will do everything
firstboot does... just with each function as a separate program you have to run. For configuring X there is
system-configure-display. There are several different apps you can use to add a user account. For your sound card there is
system-configure-soundcard. While many users aren't familiar with these utilities it doesn't hurt to get to know them. Do you know how to change your default runlevel? If not, you should.
A difference of culture
Maybe it is just me... having used Linux since 1995... but I like downloading multiple CDs (or a large DVD image) and getting the opportunity to pick what I want during the install. To me, a single install CD like Ubuntu is so "cookie cutter" in that it makes all of the choices for you. With a minimal Debian style install, I have a working base from which I can choose anything... and it doesn't try to figure out what desktop I should use or what GUI applications I want. In my experiment, I lost a little package choice granularity by selecting package groups but I could have just as easily installed fewer groups and more individual packages if desired.
Oddly enough, with the upcoming Fedora 7, the Fedora developers seem to have bought into the whole Ubuntu single CD design. They are producing a default single CD for a basic GNOME desktop and another single CD for a basic KDE desktop. It is my understanding though that Fedora still plans on releasing a DVD with everything. What I don't quite understand though is with Fedora 7 they are merging Core with Extras and Extras alone is more than a DVD worth of packages. Just how are they merging Core and Extras and still keeping with a single DVD? I guess the final release candidate and final release will answer those questions.