Mastering Linux System Administration. Richard Blum
Чтение книги онлайн.
Читать онлайн книгу Mastering Linux System Administration - Richard Blum страница 20
Make sure to select the VirtualBox package for the system on which the Ubuntu Server virtual machine will be running. Often people make an incorrect choice, because they confuse the host system with the virtual machine. Here's an example that may help: if you have a laptop running Windows where you plan on installing Ubuntu Server as a VM, then Windows is the host, and you want to download the VirtualBox package for Windows. Our examples in this chapter are based on a Windows 10 host system.
Ubuntu Server
To install Ubuntu Server as a VM, besides the hypervisor software (and the correct amount of resources on the host machine), you need an Ubuntu Server ISO image file. An ISO image file (also called an ISO image) is a specially formatted package file that contains all the files needed to boot a system. The Ubuntu Server ISO image file is used to boot and then install the distribution. In our case, we're installing it as a VM.
To get your hands on the Ubuntu Server ISO image file, go to ubuntu.com/download/server. If you are provided options for the download, choose the manual install option as shown in Figure 2.1.
You can start the process of downloading the ISO image file by clicking the Download button. Depending on the web browser you are using, you may have to deal with some pop‐up windows that want to confirm it is OK to download this file.
Since the ISO file is large, it's important to verify that no corruption has occurred while the software was downloading. If you have a corrupt ISO image file, you'll need to download the file again.
FIGURE 2.1 Option to choose an Ubuntu Server ISO image file download
CHECKING THE UBUNTU SERVER ISO IMAGE FILE
Once the Ubuntu Server ISO image file is completely downloaded, you need to verify it. To do this, we'll employ hashing. Hashing uses a one‐way mathematical algorithm to create a fixed‐length hash, which is basically a series of letters and numbers. A hash is also called a message digest, a hash value, a fingerprint, a signature, or cipher text. One cool thing about hash values is that hashing produces the same hash value for files that are the same. You can take a file with a picture in it and copy it to another location. If we use hashing to produce a hash value for the original picture file and for the copied picture file and those two hash values match, we know that the picture was not corrupted when it was copied to the new location.
Follow these steps to produce a hash value to check your image file:
1 On your Windows 10 system, open the Windows 10 PowerShell app by typing Windows PowerShell in the search bar and clicking the resulting Windows PowerShell app icon.
2 After the Windows PowerShell app window is open and you have a prompt, assuming you downloaded your Ubuntu Server image file to the Downloads folder, type cd Downloads and press Enter. The prompt should now show that you are in the Downloads folder.
3 Run the PowerShell hashing utility on the Ubuntu Server image file by typing Get‐FileHash ubuntu, and press the Tab key so that PowerShell autocompletes the Ubuntu Server's image filename for you. Go on to the next step before you press Enter.
4 Complete the rest of the PowerShell command by pressing the spacebar, typing ‐Algorithm SHA256, and pressing Enter. Be patient! It may take a while for the command to output the SHA256 hash value. You should see something similar to the following:Don't exit the PowerShell window yet. You need to compare your resulting hash value with the current SHA256 hash value on the Ubuntu website.
5 Open your favorite web browser and go to releases.ubuntu.com/focal/SHA256SUMS. (If this web page has been moved, you may need to search the releases.ubuntu.com site to find the Ubuntu Server ISO image file's SHA256 hash value.)
6 Compare the hash value on the website with your hash value in PowerShell for the Ubuntu Server ISO image file. If they match, no file corruption occurred when you downloaded the file, and congratulations—you're ready to move forward in the installation process! However, if the hash values don't match, you need to download the file again and repeat this checking process.
7 Type exit at the PowerShell prompt to leave the app.
Verifying that the Ubuntu Server ISO image file is a good copy will save you time. If you tried to use a corrupt image file in an installation, it may work partway through the process and then quit before completion. That's frustrating. It's always best to check that your file is good before proceeding within an install.
PREPARING FOR A HARDWARE INSTALLATION
If you are planning on installing the Ubuntu Server distribution directly on a computer's hardware, instead of creating a VM, you need to do one additional step after checking the ISO image file: create a bootable media device. While bootable DVDs were popular many years ago, most hardware installations can be handled through a bootable USB drive. The process of creating this bootable USB (or DVD) is called burning an ISO file to a USB drive.
You cannot just copy the file to the USB. Instead, you need a special software app that will burn the ISO properly. To find the right software, open your web browser and go to your favorite search engine. Type burn a bootable USB and press Enter. The resulting list will have several sites with instructions that point to free software. Once you have your Ubuntu Server ISO image file properly burned to a USB (or DVD) drive, you're able to boot your system and perform the installation process similar to what is covered in the next section.
Now that you've verified your copy of the Ubuntu Server ISO image file and downloaded the Oracle VirtualBox hypervisor software, you're ready to start the installation. We'll cover that process next.
Running the Installation
To create an Ubuntu Server VM, you need to first install the hypervisor, Oracle VirtualBox. Once that software is up and running, you can set up and install Ubuntu as a VM using its ISO image file and the hypervisor.
Oracle VirtualBox
The Oracle VirtualBox hypervisor software will allow you to do much more than set up Ubuntu Server as a Linux VM. You can also install another version of Windows within a VM and use it to try out features or configurations you normally wouldn't do on your main system.
INSTALLING ORACLE VIRTUALBOX ON WINDOWS 10
If you have ever installed an app on Windows, the process of installing the Oracle VirtualBox hypervisor will feel familiar.