Installing CentOS 6 on a Clean Disk Drive

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

Purchase and download the full PDF, ePub & Kindle versions of this CentOS 6 eBook 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 6 involves installing the operating system. CentOS 6 can be installed either in a clean disk environment (where an entire disk is cleared of any existing partitions and dedicated entirely to CentOS 6) or in a dual boot environment where CentOS 6 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 6 with Windows in a Dual Boot Environment.


Trying CentOS 6 without Installing

In addition to installing CentOS 6, there is one other option that will allow you to try out CentOS 6 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 booted run from the DVD/CDROM drive of your system without making any changes to the hard disk drive. 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, in addition to providing a live, bootable environment in which to try out CentOS 6, the Live CD also provides the ability to install the operating system onto a hard disk drive. Once the live system is running, simply look for the Install to Hard Drive icon on the desktop. Installation from a Live CD involves a preconfigured operating system image being written directly to the disk drive with no control over which packages get installed. Whilst packages may be added and removed post-installation, if detailed control over package selection during installation is required it is necessary to perform the installation using the CentOS 6 installation DVD images.

Secondly, because the Live CD system runs on a virtual disk drive in memory, as soon as you shut down or reboot the system 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 6 up and running without wiping or repartitioning disk drives, but to really appreciate the power of the CentOS 6, you need to install it to a disk drive.

After you decide to install CentOS 6 onto a hard disk drive it is worth keeping the Live CD in a safe place. It is an ideal tool for performing system rescue and maintenance tasks in the event of problems with the installed system.

Obtaining the CentOS 6 Installation Media

An alternative to running the Live CD is to install directly onto a hard disk drive using the CentOS 6 installation media. In addition to installing from within the Live CD, it is also possible to download and install directly from the CentOS 6 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 is downloaded in the form of two ISO format DVD images. The DVD images are named using the following convention:


Alternatively, the image may be downloaded using BitTorrent by selecting the corresponding .torrent file.

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

Installing CentOS 6

Insert the first CentOS 6 DVD 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 setup menu for your computer and change the boot order so that it boots from the DVD drive first. Once the system has booted you will be presented with the following screen:

The CentOS 6 Boot Screen

To install using the graphical installer, simply select the first installation option and press the <Enter> key. If you encounter problems with the display when the graphical installer begins, reboot and try again with the basic video driver option. Note also that if the host system has insufficient memory or a graphics card is not detected, the installer will run in text mode. To force the installation to take place in text mode, press the Esc key when the above menu screen is displayed and enter linux text at the resulting boot prompt followed by Enter.

Options are also available to boot from the current operating system on the local drive (if one is installed), test the system memory, or rescue an installed CentOS 6 system. The last option alone is reason enough to keep the installation DVD in a safe place in case you need to perform a rescue at some future date.

The CentOS 6 installer 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. Navigate through the next few pages to configure your preferred language, keyboard type and storage devices (unless you plan to use a Storage Area Network device, the Basic option is recommended). If the installer detects that the target disk needs to be initialized, a dialog will appear seeking confirmation.

When prompted, enter a suitable host name for the CentOS 6 installation. This is the name by which the system will be identified on the network to which it is attached. Additional network configuration options may be modified by clicking on the Configure Network button, selecting a network interface and clicking on the Edit… button.

Timezone and the Root Password

Subsequent screens will request information about Timezone and the root password of the system.

On the Timezone screen, make a selection corresponding to your geographical location. The option is also provided to use UTC which automatically adjusts the time to account for daylight savings time. If the computer on which CentOS 6 is being installed also runs another operating system which already uses UTC (such as Windows), leave this option unselected.

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.

The installer will subsequently move on to the disk partitioning screen.

Partitioning a Disk for CentOS 6

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:

CentOS 6 Disk Partitioning options

A number of options are provided for allocating space for the installation of CentOS 6:

  • Use All Space - The entire disk drive will be assigned to the CentOS 6 operating system 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.
  • Replace existing Linux System(s) - 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 6. Once again, it is important to backup any user data that may still be needed.
  • Shrink Current system - Allows an existing partition to be reduced in size to make room on the drive for the CentOS 6 installation. More details on this option are provided in a later chapter entitled Installing CentOS 6 with Windows in Dual Boot Environment.
  • Use Free Space - 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 6 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. Unless you have experience with low level disk partitioning this option is not recommended.

On this screen, make a selection based on your requirements. If, for example, the entire disk is to be used for CentOS 6, select the Use All Space option. In order to implement a dual boot configuration, refer to Installing CentOS 6 with Windows in a Dual Boot Environment.

For the purposes of this chapter we are assuming the entire disk is available to accommodate the CentOS 6 installation so select the Use All Space 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, click Next to begin the partitioning process.

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:

Making CentOS 6 package installation selections

This screen allows you to make general choices about the type of functions you need the system to perform. Ideally, you should select the option that most closely resembles the intended purpose of the system.

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 System -> Administration -> Add/Remove Software menu option. In the interests of security and efficiency it is generally recommended that the minimum number of packages be installed initially and then other packages added on as needed basis once the operating system is up and running.

The Physical Installation

Having made the appropriate package selections, clicking Next will initiate the installation process. During the installation process, the installer will provide a running commentary of the selected packages as they are installed together a progress bar. 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 6 Setup Agent will appear with a welcome message. Click on the Forward button to display licensing terms and conditions and select the option to accept the terms of the agreement (assuming of course that you do agree to them).

Work through the remaining screens to create a user account for yourself and verify the date and time. If you would like the date and time of your CentOS 6 system to be synchronized with an external Network Time Protocol server, select the Synchronize date and time over network option before proceeding. Finally, choose whether or not to enable Kdump support.

Having worked through all the set up pages, click Finish to exit the setup agent and log in using your newly created account credentials.

Installing Updates

As with most operating systems today, the each particular release of CentOS 6 distribution continues to evolve after it has been released to the public. This generally takes the form of bug fixes and security updates and, occasionally, new features that may be downloaded over the internet and installed on your system.

Best practices dictate that the first step after installing CentOS 6 is to make sure any available updates are applied to the system. This can be achieved either through the desktop environment or via the command-line prompt in a Terminal window. The CentOS 6 desktop environment places an indicator in the top desktop panel to notify the user that updates are available to be applied to the system. This indicator takes the form of orange star with a bug crawling on it. Moving the mouse pointer over this icon will display a message indicating the number of updates that are currently available for the system as illustrated in the following figure:

CentOS 6 Update availability Indicator

To identify and apply updates using the graphical software update tool, either click on the toolbar icon or select the System -> Administration -> Software Update desktop menu option. The resulting dialog will download a list of available updates and provide the option for those updates to be applied to the system:

CentOS 6 Software Updates tool

Clicking the Install Updates button will begin the update process which consists of resolving package dependencies, downloading and installation of the updates. The duration of the update process will depend on the number and size of updates available combined with the speed of the internet connection to which the CentOS system is connected.

The latest updates may also be applied from within a terminal window (Applications -> System Tools -> Terminal) using the yum command:

su –
yum update

Upon execution, the yum tool will provide a list of packages that are available for update and prompt to perform the update. Once the update is complete the installation is essentially finished and CentOS 6 is ready for use.

Purchase and download the full PDF, ePub & Kindle versions of this CentOS 6 eBook for only $9.99
Kindle/ePub/PDF edition contains 39 chapters and over 240 pages.

PreviousTable of ContentsNext
About CentOS 6 EssentialsPerforming a CentOS 6 Network Installation