Performing a Clean Disk CentOS Installation

From Techotopia
Jump to: navigation, search
PreviousTable of ContentsNext
About CentOS EssentialsPerforming a CentOS Network Installation

Purchase and download the fully updated CentOS 6 Edition of this eBook in PDF, ePub & Kindle formats for only $9.99
Kindle/ePub/PDF edition contains 39 chapters and over 240 pages.

The first step on the path to learning about CentOS involves installing the operating system. CentOS can be installed either in a clean disk environment (where an entire disk is dedicated to CentOS) or in a dual boot environment where CentOS co-exists with another operating system on the disk (typically a member of the Microsoft Windows family of operating systems). In this chapter we will be covering the clean disk approach to installation. Dual boot installation will be covered in Installing CentOS with Windows in Dual Boot Environment.

Trying CentOS without Installing

In addition to installing CentOS, there is one other option that will allow you to try out CentOS without physically installing it to a disk drive. This is achieved by using the CentOS Live CD. This is essentially a copy of CentOS that can be run from the DVD/CDROM drive of your system. The Live CD image can be downloaded from the mirror sites listed on the CentOS web site at:

Once you have loaded this page into your browser, select either the i386 or x86_64 link depending on whether the target system is a 32-bit or 64-bit platform. Within the next screen select a mirror from the list to view the available downloads and look for a link to download the Live CD image. This will typically be named as follows:


Once you have downloaded the image, burn it to a CD, then make sure your BIOS is configured to boot from the CDROM/DVD drive before the hard disk and then boot from the CD. The system will boot CentOS and you will have a fully functional CentOS environment to explore.

A couple of points should be noted about the Live CD. Firstly, if you are familiar with the Live CDs for other Linux distributions such as Ubuntu or Fedora you may be expecting to be able to perform an installation to disk from the CentOS Live CD. Unfortunately it is not possible to perform an installation of CentOS from the Live CD. The only way to install is to download the entire installation distribution (as outlined below).

Secondly, because the Live CD system runs on a virtual disk drive in memory, as soon as you shut down or reboot any files you have created will be lost.

Finally, the performance of running an operating system from a CDROM is going to be orders of magnitude slower than running from a disk drive, so don’t be put off by the sluggishness of the system while you are trying it out. This is entirely indicative of the slow speed of CDROM drives, not a reflection of the performance of the operating system.

The Live CD is a good way to quickly get a copy of CentOS up and running without wiping or repartitioning disk drives, but to really appreciate the power of the CentOS, you need to install it to a disk drive.

Obtaining the CentOS Installation Media

If you have tried out the Live CD and are now ready to install, or just want to move straight to the installation phase, you will need to download the entire CentOS installation media. Once again, go to the following URL and select either the 32-bit or 64-bit link to view available download mirrors:

The installation distribution can be downloaded as either six individual CDROM images or a single DVD image. Unless you specifically need to use CD images the DVD installation image is strongly recommended. The DVD image is named using the following convention:


Alternatively, the image may be downloaded using BitTorrent by selecting the .torrent file. The CDROM images are named as follows:


Having downloaded either DVD or CDROM images, either burn them to disk or configure your virtualization environment to treat them as DVD or CDROM drives.

Installing CentOS

Insert either the CentOS DVD or disk 1 of the CDROM collection into the appropriate drive and power on the system. If the system tries to boot from the hard disk drive you will need to enter the BIOS set up for your computer and change the boot order so that it boots from the CD or DVD drive first. Once the system has booted you will be presented with the following screen:

The CentOS installer boot screen

Installation may be performed using either the graphical or text mode installers. To install using the graphical installer, simply press the <Enter> key. To use the text installer type linux text followed by the <Enter> key.

CentOS will then provide the option to test the installation media for errors. Use the arrow keys to navigate between the options and make a selection with the <Enter> key. After a short delay the first screen of the graphical installer will appear. Click on the Release Notes button if you would like to learn about any key features or problems that exist in this release of CentOS. Navigate through the next few pages to configure your preferred language and keyboard type until you reach the partitioning screen.

Partitioning a Disk for CentOS

When you reach the disk partitioning phase of the installation, the installer will present a screen similar to the one illustrated in the following figure:

The CentOS installation disk partitioning screen

The drop down menu provides a number of options in terms of how the disk will be used to accommodate the CentOS installation:

  • Remove all partitions on selected drives and create default layout - The entire disk drive will be assigned to the CentOS installation. Any pre-existing partitions, together with any existing operating systems and associated data files contained therein will be deleted to make room for CentOS. This option should only be used if you are absolutely sure you no longer need anything that is currently stored on that disk, or have already backed up all user files.
  • Remove Linux partitions on selected drives and create default layout - If the drive was previously configured to support a Windows/Linux dual boot environment or was devoted entirely to another Linux installation, this option may be selected to instruct the installer to delete the pre-existing Linux partition and replace it with CentOS, leaving the non-Linux partitions intact. Once again, it is important to backup any user data that may still be needed.
  • Use free space on selected drives and create default layout - If the current partitions on the drive do not take up the entire disk space available, any unallocated space may be assigned to the CentOS installation using this option.
  • Create custom layout - When selected, this option displays the disk partitioning tool allowing each partition on the disk to be manually configured.

For the purposes of this chapter we are assuming the entire disk is available to accommodate the CentOS installation so select the Remove all partitions on selected drives and create default layout menu option.

Beneath the partition menu is the option to encrypt the system. The choice of whether to use encryption will depend on the purpose for which the system is being used, its physical location and type of data it is going to store. Keep in mind that as with any form of encryption there are performance overheads associated with selecting this option.

Having made the partitioning selection, choose which disk drives detected on your system are to be used for the installation and click Next to begin the partitioning process.

Configuring Networking Settings

After the disk partitioning and encryption decisions have been made the installer will prompt for some networking configuration information. If your system resides on a network served by a DHCP server (a server or device that automatically assigns network IP addresses to computers on the network) you should leave the default settings unchanged in the Network Devices section of the screen. If you need to manually specify an IP address, select the network device from the list and click on the Edit button to display the Edit Interface dialog and enter your IP address and netmask information, then close the dialog and enter the gateway and DNS settings for your network into the Miscellaneous settings section of the main screen.

If you manually specified your IP address, or have a DHCP server that does not automatically provide clients with host names, select the option to manually specify the host name and enter it into the text box and click Next to proceed.

Timezone and the Root Password

On the Timezome screen, make a selection corresponding to your geographical location.

On the next screen, enter a password for the root account on the system. The root, or super-user account is a special user that has administrative privileges on the system. Whilst you will generally use your own account to log into the system, you will need to gain root privileges in order to configure the system and to perform other administrative tasks.

Package Selection

Linux is a modular operating system in that it provides a basic operating system kernel and infrastructure upon which a range of different packages may be installed depending on your specific requirements for the system. If, for example, you plan on using the system as a web server you would need to install the Apache web server package.

At this point in the installation the installer needs us to decide which packages should be installed along with the base operating system and displays the screen shown in the following figure:

CentOS installation package selection screen

This screen allows you to make general choices about the type of functions you need the system to perform. For example, if you want a graphical desktop environment in which to interact with the system keep the Desktop - Gnome option selected. Unless you know that you prefer the KDE desktop, the Gnome Desktop is recommended, and is the desktop we assume you are using throughout the remainder of this book. If the system will be acting as a web, ftp or file server, also select the Server option and so on. Based on these selections the installer will compile a list of the packages it believes you will need. We also recommend that you select the CentOS repository option. This will give us access to some CentOS specific packages that may come in useful later.

To view or modify the specific package selections, make sure that the Customize Now option is selected before proceeding. You will then be provided a complete overview of which packages are selected for installation and which are not together with the ability to make changes to these selections. Don’t worry too much about getting this exactly right at this stage. Packages can be added and removed at any time after the installation is complete by selecting the desktop Applications -> Add/Remove Software menu option.

The Physical Installation

Having made the appropriate package selections, clicking Next will display a screen indicating that the installation will begin and that a log file and kickstart file can be found on the system after installation is complete. The log file will be useful to identify any errors that occurred during the installation, and the kickstart file can be used to install CentOS on other systems using the exact same configuration created here.

During the installation process, the installer will format and partition the disk drive, provide a running commentary of the selected packages as they are installed and a progress bar. If you are installing from the 6 CDROMs as opposed to the single DVD you will need to insert the additional CDs when prompted to do so. If you are using the DVD the installation will complete without further interaction. Once the installation process is complete a screen will appear containing a button to reboot the system. Remove the installation media and click the button.

Final Configuration Steps

After the system has started for the first time, the CentOS Setup Agent will appear with a welcome message. Click on the Forward button to display the Firewall settings. By default all ports are closed on the firewall with the exception of the ssh port which allows you to remotely log into the system. The topic of firewall configuration will be covered in more detail in the chapter entitled Basic CentOS Firewall Configuration so for now leave the default settings unchanged. Leave SELinux configured as Enforcing to ensure the most secure environment. Next, create a user account for yourself and verify the date and time. If you would like the date and time of your CentOS system to be synchronized which an external Network Time Protocol server, select the Synchronize date and time over network option before proceeding to the Sound Card screen. Having worked through all the set up pages, click Finish to exit the setup agent and log in using your newly created account credentials.  

Purchase and download the fully updated CentOS 6 Edition of this eBook in PDF, ePub & Kindle formats for only $9.99
Kindle/ePub/PDF edition contains 39 chapters and over 240 pages.

PreviousTable of ContentsNext
About CentOS EssentialsPerforming a CentOS Network Installation