CentOS
From ConShell
Introduction
CentOS is a derivitave of Red Hat Enterprise Linux, versions 2, 3, 4 and now 5. So while most of the Red Hat information applies equally to CentOS, there are certain CentOS-specific things worth explaining.
Why CentOS?
CentOS is a good choice if you don't want to (or can't afford to) pay for support from Red Hat. If you choose to use CentOS your support options include:
By and large, though, you are on your own ... so pull up your bootstraps and dig in!
No really, WHY CentOS?
Here are some more reasons CentOS is preferred by myself to RHEL.
- RHN (Red Hat Network) - does anyone like this? I despise it, the subscriptions, channels, entitlements and so on make my stomach churn.
- Virtualization - if you want to run Xen or KVM you're going to like CentOS better as everything just works. On RHEL you have to be a) subscribed to the RHN b) entitled for "Virtualization" and c) have an active subscription in order to get at the related RPM Packages. That is a lot of red tape!
- Alternative file systems - if you are fan of XFS, JFS or ReiserFS you will be happier with CentOS - they provide the CentOS-Plus repository with rebuilt kernels and other packages that support these FS. Red Hat gives you the run around saying you have to talk to your sales rep to enable XFS support and that is it they have no support for JFS et al.
Reasons not to go with CentOS
You maybe be asking "what's the catch"? and having worked with CentOS since CentOS-2 I can tell you a few...
- You could find situations where you are forced to lie, cheat or steal (so to speak), for instance to obfuscate the fact that you're not running true RHEL. For instance, when working with certain software vendors they may balk at CentOS.
- You won't get great support. You might get "good-enough" support though, depending on your needs. For instance, if you have hired a capable Systems Administrator who can figure things out.
- If you have a mixed environment of CentOS and RHEL systems, they'll probably never be at a consistent patch level.
- Also, if you use the yum-security plugin to apply (just) security updates, this mechanism does NOT work for the CentOS repos. (It does, however, work for EPEL)
All in all though, I'd definitely recommend CentOS over something Fedora or Gentoo for it's stability and long-term support.
Converting to CentOS
This is the process in a nutshell. There are two approaches, actually. Both should only be done by a skilled engineer and after a complete backup has been performed.
Approach #1
This is actually easier than the 2nd approach and can be done "online".
See http://wiki.centos.org/Migration/5 and http://wiki.centos.org/HowTos/MigrationGuide
Approach #2
Boot the system with the CentOS media. At the boot: prompt type linux text upgradeany
yum repo
Creating a yum repo is rather easy.
Put all your RPMS in a folder.
yum install createrepo cd /path/to/RPMS createrepo -v .
Next, fashion a repo definition file in /etc/yum.repos.d/local.repo. This example used a file: URL
[local-repo1] name = Local custom packages baseurl=file:///path/to/RPMS/ gpgcheck=0
yum vs. up2date
Another consideration is the use of yum vs. up2date for patching the system. I believe yum is a better choice, it is more intuitive and easier to learn. However, newer versions of up2date have the RPM rollback option, which is neat.
yum-utils for old kernel cleanup
Over time your system may pile up a heap of kernels. Since you can only run one kernel at a time, it makes sense to not keep more than 2 (current and one older/backup). Here's a tip from Bart Schaefer explaining how to prune the kernel list down to just two.
yum install yum-utils package-cleanup --oldkernels --count 2
Instruct yum or rpm to save old packages
This is handy when patching your system and want to keep the old (replaced) packages around for a time. Specify this in /etc/yum.conf
tsflags=repackage
The RPMs that yum replaces (e.g. during yum update) will be repackaged and put into /var/spool/repackage/
The other way to do this is to specify the following in your /etc/rpm/macros file. If the file does not exist simply create it:
%_repackage_all_erasures 1
Kickstarting CentOS-5 and DHCPv6 timeout
There is a looooooonnnngggg (1 minutes) DHCP timeout while it tries to get a DHCPv6 address (not likely).
Someone suggested adding "noipv6" kernel arg when booting.
Yes it works!
Net Install
Boot from the netinstall iso. When prompted, choose HTTP as the install method and provide this URL (works for me): http://ftp.osuosl.org/pub/centos/6/os/x86_64/
Adjust URL to suit the version and arch you are actually installing.
See Also
del.icio.us
digg
Facebook
Posterous
reddit