How to install CentOS 6

How To Install CentOS 6 Linux for Servers & Desktops

by kjs on February 29, 2012

How To Install CentOS 6

Step by step guide to on how to install CentOS 6 Linux (in this case 64 bit) from scratch on a new machine, the install type is minimal which is PERFECT for servers, no GUI will be installed and the installation will be as lean as possible. This is how I install all my Linux servers, this guide can also be used to install CentOS on desktop or laptops, you simply select a different option at step 18.

First off visit http://centos.org and download the install ISO image(s) for your servers architecture (i686, x86_64 etc). I would recommend the torrent option of downloading the CD / DVD images this is by far the fastest way and torrents automatically md5 check the download images this prevents file corruption, which is common on large file downloads.

How to install CentOS 6 for Servers & Desktops

  1. Set your computers BIOS to boot form CD / DVD
  2. Insert the CentOS 6 CD or DVD
  3. When presented with the following screen press enter on Install or upgrade an existing system.
    install centos 6 boot screen
    How to install CentOS 
  4. You will now be presented with a CD Check, I always skip this step… I live life on the edge when it comes to media checking on Linux installs. However you might want to check the media.
    how to install centos 6 cd check

  5. You will now see some black and white text on your screen as your computer loads the X11 environment for the CentOS install, after 30 seconds or so you will be presented with the CentOS GUI installer, click next.
    install centos 6 welcome screen
  6. Select your Language, I am British (please no jokes about drinking tea on Twitter…) so I would select English (English).
    install centos 6 language selection
  7. Select your keyboard type
    install centos 6 keyboard type
  8. Storage type, as I am installing on my local hard drive I selected “Basic storage type” if you are using iSCSI or similar technology now would be the time to set it up.
    install centos 6 basic storage type
  9. As this is a clean install and the drive has never been formatted before I got the following Initialize drive warning, you might get the same if your drive (or virtual hard disk) is brand new.
    install centos 6 initialize drive
  10. Set the hostname for your Server
    install centos 6 set hostname
  11. Set your timezone / location
  12. Set your root password, something sensible please… Don’t set weak dictionary passwords or  you will get hacked by a 13yr old russian super hackz0r… You might want to check out my guide on how to secure SSH.
    install centos 6 set root password
  13. You will now be set with a bunch of options for your disk partitioning, as this is a new fresh install I selected the top option “Use All Space” chose the relevant option for your setup and tick the review and modify partition layout.
    install centos 6 partitioning
  14. You will now see your partition table laid out, now is the time to modify it if required. If this is a server I would suggest you create some different partitions for /home and /var. These are the two partitions that crash Linux servers, /home because users fill their home drives and causes the system to crash and /var because the log or ftp directories fill up and crash the server.
    install centos 6 partition review
  15. Format warning, click on Format (this will delete your data.
    install centos 6 format warnings
  16. You will now see a warning about writing the changes to disk, click on Write changes to disk.
    install centos 6 write changes to disk
  17. Boot loader options, I left this as default you might want to set a boot loader password.
    install centos 6 boot loader
  18. The next part is important, for servers I ALWAYS select minimal, this installs a minimal setup which is ideal for servers, if you are installing for a desktop you might want to chose one of the other options. I would avoid the chose everything option as this will create a bloated system that will be more susceptible to hackers.
    install centos 6 minimal install
  19. CentOS 6 will install
    install centos 6 installing
  20. CentOS 6 has installed, congrats
    install centos 6 installed congrats
  21. Reboot and login as root
    install centos 6 login as root
  22. Update the system using “yum update”
    install centos 6 yum update

That’s it your done! Go forth and setup your server for what ever services you require, Asterisk, LAMP etc.

I hope this tutorial on how to install CentOS was helpful! Don’t forget to follow us on Twitter, if you have any questions please post a comment!


Previous post:

Next post: