CentOS Linux Server
CentOS stands for Community ENTerprise Operating System. It is made to be very similar to Red Hat Enterprise Linux (RHEL). Essentially, a group of volunteers take the same software as RHEL uses, compile it, bundle it, and put it on various mirrors around the globe for you and I to freely use. The difference between CentOS and RHEL is largely one of support, plus the fact that Red Hat employs many of key Linux developers so they have the scoop on some of the things that are coming down the pike.
Large enterprises like RHEL because it has a support model similar to other big players in the software industry. Small businesses who don't have the in-house skills to justify Gentoo and would like to use RHEL but cannot justify Red Hat's cost of a few thousand dollars per year per server find that CentOS fits the bill perfectly.
Get it
The first step is to download it. The CentOS 5 download page is here. You probably want to download the 64-bit (x86_64) software if you have a fairly new server with more than 4GB or more of memory unless you need to run software that requires a 32-bit platform.
I suggest downloading the network installer, since it is only 10MB and then you will only be downloading the software that is needed instead of entire CDs that will undoubtedly contain many packages you will never use. If you have many servers you plan to load and you do not have a caching Proxy Server then you should download the ISO images instead.
Burn it
Once you download one or more ISO images, you can burn them to CD with one of these commands shown below (on a Linux machine). These commands assume you downloaded the 64-bit Internet-based installer named CentOS-5.6-x86_64-netinstall.iso – adjust the file name as required.
To burn to a CD-RW, first erasing any content on the disc,
cdrecord -v dev=/dev/sr0 -tao -eject blank=fast CentOS-5.6-x86_64-netinstall.iso
To burn to a standard CD-R disk:
cdrecord -v dev=/dev/sr0 -tao -eject ISONAME CentOS-5.6-x86_64-netinstall.iso
To place it on a USB stick I recommend using unetbootin.1)
Run it
Boot the CD or USB stick, press ENTER, when the installer screen appears press ENTER twice more (for language and keyboard), set-up your network interface (just use the defaults, press TAB until OK is highlighted and then press ENTER), then enter a local mirror. The list of mirror sites is on centos.org. For example, I most recently used:
Site: mirror.csclub.uwaterloo.ca Location: /centos/5.6/os/x86_64
After that you will be asked whether to use the entire hard disk. I will not cover setting-up multiple O/S booting on the machine here, but it's not that difficult. CentOS handles loading itself to LVM as well as regular partitions just fine. Some basic guidelines I find work for me with version 5.6:
| Mount point | LVM initial size | Partition size |
|---|---|---|
| /boot | 100MB | 200MB on /dev/sda1 |
| swap | Size of RAM on /dev/sda2 | |
| / (root) | 5GB | 50GB to all remaining capacity on /dev/sda3 |
| /var | 4GB | 30GB to 100GB+ on /dev/sda5 |
| /usr | 5GB | 30GB to 50GB on /dev/sda6 |
| /tmp | 1GB | 4GB to 10GB on /dev/sda7 |
| /home | 2GB | 2GB to all remaining capacity on /dev/sda8 |
If you will have web sites at /var/www and MySQL or PostgreSQL at /var/lib then you may want to set the size of /var at what will be appropriate to hold all of your data with room to spare.
If this will be a mail server and you will be storing user's mail in their home directories, you probably want to allocate the bulk of storage there. If the mail will be stored in the traditional /var/spool directory, then allow extra space for the /var partition.
The installer will prompt you to choose any other software. You may want to choose the Server and Server GUI boxes, along with your favourite desktop environment (Gnome or KDE), if you intend to use a graphical interface.
For maximum security (e.g., for a server that needs to be PCI-compliant) or maximum stability you will want to un-check all of the options (including graphical desktop) and install only the software you need.