Although my favorite distribution is obviously Debian there are times when I use other distributions including RedHat, actually I quite like RedHat and the first Linux distribution I ever used was RedHat 3.0, though I switched to Debian shortly afterwards!
As anyone who has followed my blog will know I prefer the ‘less is more’ approach and so I thought I’d document a minimal CentOS install using the network installer.
It is a bit different from a typical Debian install as there are two distinct phases, a text-based configuration process, followed by a graphical installer. It was quite straight forward, though I was a bit thrown off when asked for the URL of the installation image (see below) as I expected to be able to choose an appropriate mirror from a drop down list.
To get started you will need to download the netinstall image that corresponds to your machine’s architecture.
Downloading the Network Install CD
To begin you will need to download an image of the network installation CD from one of the CentOS mirror sites, since I am in the UK I used the University of Kent UK Mirror service which hosts both the 32-bit and 64-bit netinst ISO images.
- 32-bit systems –
http://www.mirrorservice.org/sites/mirror.centos.org/6.8/isos/i386/CentOS-6.8-i386-netinstall.iso
- 64-bit systems –
http://www.mirrorservice.org/sites/mirror.centos.org/6.8/isos/x86_64/CentOS-6.8-x86_64-netinstall.iso
If you are installing CentOS 6 on a physical machine you will have to burn the image to a physical CD before booting from it. If you are installing it on a virtual machine (as I was) then it is even easier as all you need to do is download the ISO and attach it to you virtual machine’s CDROM drive.
Installation Image URL
During the installation the installer will prompt you to manually enter the URL for the installation image. I’m not sure why you can’t just select it from a drop down list, however entering the URL manually does allow you to set up your own installation server if needed. Since CentOS 6.x supports both 32-bit and 64-bit architectures, the URL you will need to use depends on which one you are using:
- 32-bit systems –
http://mirror.centos.org/centos/6/os/i386
- 64-bit systems –
http://mirror.centos.org/centos/6/os/x86_64
Note – CentOS 7.x only supports 64-bit.
Network Install
If you have managed to download the netinstall ISO image successfully then if everything works the first screen you should see is the initial boot menu for the installer. I like the fact that the network install CD includes a ‘rescue’ option and a memory test, the latter provides a useful way to check that the memory is working properly after upgrading or replacing the RAM on a system.
The default option to install or upgrade and existing system will be automatically selected after 60 seconds after which the system will start to boot.
You then have the option to check the install media for errors, however this is time-consuming and as we aren’t installing from CD it is probably unnecessary so you can skip it.
The next step is to select your preferred language and keyboard layout.
Then you need to select the source for the installation image, in this case we will need to enter the URL to the mirror containing the image.
The installer will then prompt you to configure the network. The default is for the installer to attempt the automatic configuration of both IPv4 and IPv6, but since my home network only supports IPv4 I deselected IPv6 (I guess I should get a new router sometime).
The installer will then configure the network interface and prompt you to enter the URL for the installation image.
You will need to enter the appropriate URL for your architecture.
If you have entered a valid URL then the system will begin to download the installation image.
This can take a while so you will need to be patient!
When the download is complete the second stage of the installation process will start.
The first step is to select which disks should be used, since this was a fresh installation on to a dedicated machine I just selected the default option – the installer will prompt to confirm your disk selection. No changes are made to the disk at this stage. The installer will prompt you to select how you want to use the disk later.
The next step is to configure the network name for the machine, which is also a little different from a Debian installation as you need to enter the Fully Qualified Domain Name (FQDN) for your new machine rather than enter the machine name and domain name separately.
You will them be prompted to select a timezone and set the root password.
Unlike a Debian system no user accounts are created at this stage so your first login will be as root.
You will then be asked how the disk space should be used, as I was installing the system on a dedicated machine I simply opted to use the whole disk and left it up to the installer to decide how it should be partitioned.
You be prompted to confirm that you want to write the changes to the disk before the partitions are formatted.
Note – If you want to select to boot loaded will be written then you need to check ‘Review and modify partitioning layout’ before clicking on ‘Next’.
The installer will then prompt you to select the default type of installation, since I wanted a minimal command line system I selected ‘Minimal’
The installer will then download and install the selected packages from the default repository (which can take a while!).
When the installation has completed you will be prompted to reboot.
By default CentOS does not display the boot messages and boot progress is shown using uses a blue progress bar (RedHat predictably has a red one).
Since this is a minimal install you should then see a login prompt on the console.
A minimal CentOS installation will enable the network interface and allow root to login using ‘ssh’ by default.
That is it – installing packages is a little different in a RedHat based distribution but I’ll cover that later!