Downloading CentOS and confirming the checksum on Windows or OS X
In this recipe, we will learn how to download and confirm the checksum of one or more CentOS 7 disk images using a typical Windows or OS X desktop computer. CentOS is made available in various formats by HTTP, FTP, or the rsync protocol from a series of mirror sites located across the world or via the BitTorrent network. For downloading very important files from the Internet, such as operating system images, it is considered best practices to validate those files' checksum, in order to ensure that any resulting media would function and perform as expected when installing. This also makes certain that the files are genuine and come from the original source.
Getting ready
To complete this recipe, it is assumed that you are using a typical Windows-based (Windows 7, Windows Vista, or similar) or OS X computer with full administration rights. You will need an Internet connection to download the required installation files and also need access to a standard DVD/CD disk burner with the appropriate software, in order to create the relevant installation disks from the image files. For the purpose of this recipe, it is assumed that all the downloads will be stored on Windows in your personal C:\Users\<username>\Downloads
folder, or if using an OS X system, in the /Users/<username>/Downloads
folder.
How to do it...
Regardless of the type of installation files you download, the following techniques can be applied to all the image files supplied by the CentOS project:
- Let's begin by visiting http://www.centos.org in a web browser and navigate to the button link Get CentOS Now. Then click the link list of the current mirrors in the text.
- The mirror sites are categorized, so from the resulting list of links, choose a mirror that is geographically near your current location. For example, if you are in London (UK), you can choose a mirror from EU and United Kingdom. Now choose a mirror site by selecting either the HTTP or the FTP link.
- Having made your selection, you will now see a list of directories of all the available CentOS versions. To proceed, simply click the appropriate folder that reads
7
. Next, you will see an additional list of directories, such asatomic
,centosplus
,cloud
, and so on. We proceed by choosing theisos
directory. - CentOS 7 currently only supports the 64-bit architecture, so browse to the only directory available labeled
x86_64
, which is a container for the 64-bit version. - You will now be presented with a series of files available for download. Begin by downloading a copy of the valid checksum result identified as
md5sum.txt
. - If you are new to CentOS or are intending to follow the recipes found throughout this book, then the minimal installation is ideal. This contains the least amount of packages to have a functional system, so choose the following (
XXXX
is the month stamp of this release):CentOS-7-x86_64-Minimal-XXXX.iso
- On a Windows-based system only (on Mac, this tool is already available in the system), visit http://mirror.centos.org/centos/dostools/ in your browser and download the program
md5sum.exe
. - Now on Windows, open the command prompt (typically found at Start | All Programs | Accessories | Command Prompt) and type the following commands into the window that will open (press the Enter key at the end of all the lines):
cd downloads dir
- On OS X, open the program Finder | Applications | Utilities | Terminal, then type the following commands (press the Enter key at the end of all the lines):
cd ~/Downloads ls
- You should now see all the files in your download folder (including all the downloaded CentOS installation image files, the md5sum.txt file and on Windows, the md5sum.exe program).
- Based on the file names shown, modify the following command in order to check the checksum of your downloaded ISO image file. On Windows, type the following command (change the
XXXX
month stamp accordingly):md5sum.exe CentOS-7-x86_64-Minimal-XXXX.iso
- On OS X, use instead:
md5 CentOS-7-x86_64-Minimal-XXXX.iso
- Press the Return key to proceed and then wait for the command prompt to respond. The response is known as the MD5 sum and the result could look like the following:
d07ab3e615c66a8b2e9a50f4852e6a77 CentOS-7-x86_64-Minimal-1503-01.iso
- Now look at the the sum and compare against the relevant listing for your particular image file in
md5sum.txt
(open in a text editor). If both the numbers match, then you can be confident that you have indeed downloaded a valid CentOS image file. If not, your downloaded file is probably corrupted, so please restart this procedure by downloading the image file again. - When you have finished, simply burn your image file(s) to a blank CD-ROM or DVD-ROM using your preferred desktop software, or create a USB installation media from it, as we will show you in the next recipe in this chapter.
How it works…
So what have we learned from this experience?
The act of downloading a CentOS installation image is just the first step towards building the perfect server. Although this process is very simple, many do forget the need to confirm the checksum. In this book, we will work with the minimal installation image, but you should be aware that there are other installation options available to you, such as NetInstall, DVD, Everything, and various LiveCDs.