Downloading CentOS and confirming the checksum on a Windows desktop
In this recipe we will learn how to download and confirm the checksum of one or more CentOS 6 disk image(s) using a typical Windows desktop computer.
CentOS is made available in various formats by HTTP, FTP, or via a Torrent-based client from a series of mirror sites located across the world. It supports both the 32-bit and 64-bit architectures, and having downloaded one or more image files, it is often a good idea to validate those files' checksum in order to ensure that any resulting media should function and perform as expected.
Getting ready
To complete this recipe it is assumed that you are using a typical Windows-based computer (Windows 7, Windows Vista, or similar) with full administration rights. You will need an Internet connection to download the required installation files and access to a standard DVD/CD disk burner with the appropriate software in order to create the relevant installation disks.
How to do it...
Regardless as to what type of installation files you download, the following techniques can be applied to all image files supplied by the CentOS project:
- So let's begin by visiting http://www.centos.org/mirrors-list in your browser.
Note
This URL was correct at the time of writing this book, but if it's no longer functional or is not available, then simply visit http://www.centos.org and navigate to Downloads | Mirrors | CentOS Public Mirror List or review the links associated with the latest release announcements made on the home page.
- The mirror sites are categorized, so from the resulting list of links, choose a mirror that best suits your current location. For example, if you are in London (UK), you can choose European Mirrors (Countries N-Z).
- From the resulting list and depending on your preferred method of downloading the CentOS images, scroll down and 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 or folders that will allow you to choose the version of CentOS you want to install. To proceed, simply select the appropriate folder that reads 6.X, where X is the required minor release of CentOS 6.
- Having chosen the preferred minor release of CentOS you want to install, you will now see an additional list of directories that includes centosplus, contrib, cr, extras, fasttrack, isos, os, and updates. To proceed, choose the isos directory.
- At this point you are now given the opportunity to choose the preferred architecture. The directory labeled
i386
is a container for the 32-bit version while the directory labeledx86_64
is a container for the 64-bit version. Make the appropriate selection to proceed. - You will now be presented with a series of files available for download. Begin by downloading a copy of the valid checksum result labeled or identified as
md5sum.txt
.Note
As this is a standard text file, place your mouse on the link, right-click and choose Save As to download a copy of
md5sum.txt
. When finished, store this file in a safe place for future reference. For the purpose of this recipe, it is assumed that all downloads will be stored in yourC:\Users\<username>\Downloads
folder. - Now, depending on which installation image best suits your needs, start downloading the relevant file(s) in the usual way.
Note
If you are new to CentOS or are intending to follow the recipes found throughout this book, then the minimal installation is ideal. However, you should be aware that there are other options available to you.
For a full 64-bit DVD-based installation, you will need both:
CentOS-6.X-x86_64-bin-DVD1.iso
CentOS-6.X-x86_64-bin-DVD2.iso
For a full 32-bit DVD-based installation, you will need both:
CentOS-6.X-i386-bin-DVD1.iso
CentOS-6.X-i386-bin-DVD2.iso
For a minimal installation, you should choose either:
CentOS-6.X-i386-minimal.iso (32-bit version)
CentOS-6.X-x86_64-minimal.iso (64-bit version)
For a network installation, you should choose either:
CentOS-6.X-i386-netinstall.iso (32-bit version)
CentOS-6.X-x86_64-netinstall.iso (64-bit version)
If you choose to download a torrent file, then you will need to extract these files in the usual way in order to build the appropriate ISO image file(s).
- When you have finished downloading the required files, visit http://mirror.centos.org/centos/dostools/ in your browser.
- Now download the following DOS-based tool in order that we can use it to validate our installation files:
md5sum.exe
Note
The full URL is http://mirror.centos.org/centos/dostools/md5sum.exe.
- It is assumed that you have downloaded all the files to the typical downloads folder of the current user profile on your Windows desktop (
C:\Users\<username>\Downloads
), so when the download is complete, open Command Prompt (typically found at Start | All Programs | Accessories | Command Prompt) and type the following command to access this location:cd downloads
- To see the list of files and the relevant extensions, type the following command:
dir
- The command prompt should now list all the files in your download folder (including all image files,
md5sum.txt
, andmd5sum.exe
). Based on the file names shown, modify the following command in order to check the checksum of your ISO image file and type:md5sum.exe your_image_file_name_here.iso
- Press the Return key to proceed and then wait for the command prompt to respond. The response is known as the sum and the result could look like this:
087713752fa88c03a5e8471c661ad1a2 *CentOS-6.X-x86_64-minimal.iso
- Now look at the value given, this is known as the sum, and compare against the relevant listing for your particular image file listed in
md5sum.txt
. If both numbers match, then you can be confident that you have indeed downloaded a valid CentOS image file. - Now repeat this process for any remaining image files and when you have finished, simply burn your image file(s) to a blank CD-Rom or DVD-Rom using your preferred desktop software.
How it works…
The act of downloading an installation image and validating the file's integrity is just the first step towards building the perfect server, and although the process of downloading CentOS is very simple, many do forget the need to confirm the checksum.
So what have we learned from this experience?
We began this recipe by showing you how to download CentOS by outlining the various options available to you. It is not expected that you will need to do this often, but during the course of this recipe you also learned how to navigate the CentOS Project website and select the best download location based on your current location.
Having done this, our next step was to obtain a copy of md5sum.txt
before downloading the preferred image files.
Note
The choice as to whether you selected a 32-bit or 64-bit version is largely dependent on the specification of your intended server. However, given the abilities of most modern computers, for most people the obvious choice will be the 64-bit version in order that you can take advantage of the improved code base and support more than 4 GB of RAM.
The time required to complete the task of downloading the relevant files will depend largely on the speed of your Internet connection, but it was important that we obtained a copy of md5sum.exe
in order to confirm file integrity and compare the value given against those listed in md5sum.txt
.
The DOS-based tool was obtained from http://mirror.centos.org/centos/dostools/md5sum.exe.
Having completed these steps, we then proceed to open a command prompt session and navigate to the expected destination of all the files by typing:
cd downloads
We then proceeded to view the contents of C:\Users\<username>\Downloads
by typing the following command:
dir
This action lists the filenames concerned, thereby enabling us to modify the following command in order to validate the appropriate ISO files:
md5sum.exe your_image_file_name_here.iso
The resulting response provides us with the checksum value of the file in question in order that we can compare it with the corresponding value found in md5sum.txt
.
For example, the content of md5sum.txt
may look like this:
087713752fa88c03a5e8471c661ad1a2 CentOS-6.X-x86_64-minimal.iso
Whereas the display in command prompt may show:
087713752fa88c03a5e8471c661ad1a2 *CentOS-6.X-x86_64-minimal.iso
You should repeat this process for all image files, and if these values match, then you can be confident that your download is verified. A fact that not only reduces the chance of wasting optical disks, but with security in mind, it also implies that what you downloaded is what you were expecting to download (and not something else).
So remember, with every new release the CentOS team will update the main website and enable you to download the required image files. Unless the CentOS project states otherwise, you will only need to do this once, as all minor updates can be managed like any other operating system (discussed later in this book). However, if you do intend to download them again, then it is always a good idea to check the integrity of your image files with the md5sum
checksum tool.
See also
- CentOS project home page: http://www.centos.org
- CentOS project – mirror list: http://www.centos.org/mirrors-list
- CentOS project – approved vendors: http://www.centos.org/vendors
- CentOS project – download FAQ regarding md5 checksum: http://www.centos.org/modules/smartfaq/faq.php?faqid=46
- CentOS project – how to burn an ISO image: http://www.centos.org/docs/5/html/CD_burning_howto.html