Last Updated: 28 Oct 2023

   |   

Author: 114.119.128.253

Basic CentOS Server Setup

This document details basic steps for getting a CentOS server setup. This is based on CentOS 5.

  • First up, install CentOS from the DVDs. A basic install is fine.
  • CentOS comes in 32-bit (i386) and 64-bit (x86_64) editions. Most machines these days are 64-bit, so that is probably what you want.
  • Most likely, you want to accept the default partition tables, and do not want any of the optional GUI modules (or 'Server' modules, etc.). This will give you a plain-vanilla install.
  • Be sure to install the GRUB boot loader, even if CentOS is going to be the only OS on the box. If you say 'no boot loader' during the install, CentOS won't install any bootloader, leaving whatever you had before intact. This may be obvious to some, but I thought it would overwrite the MBR with a single boot record pointing to CentOS. It doesn't.
  • Update the OS to all the lastest software. See Keeping CentOS Up To Date
  • Install any optional software that you want. YUM is the best way to do this; use:
    yum install httpd
    yum install mysql-server
    yum install php*
    ...etc...
  • You may find cases when the base CentOS repo doesn't have the software you need, or doesn't have the correct version of said software. In those cases, you'll need to turn to a third party repo like the EPEL
  • You need to be a little bit careful installing software. 32-bit software can run on a 64-bit system, but not vice-versa. And if you're installing dynamically loaded modules, you need to make sure that you use 32-bit modules for 32-bit software, and 64-bit modules for 64-bit software. I once tried to load a 32-bit libphp5.so into a 64-bit apache, and got a pretty cryptic error: wrong ELF class: ELFCLASS32 Once I found a 64-bit libphp5.so, things started working again.

Discussion

Enter your comment. Wiki syntax is allowed: