Читать книгу Mastering Linux System Administration - Richard Blum - Страница 90

Real World Scenario INSTALLING CentOS AS A VM

Оглавление

After configuring the CentOS VM within the VirtualBox hypervisor, you can perform the actual installation of the Linux OS. Conducting the installation process on a VM is similar to conducting it on a physical server. There are just a few differences, such as loading the ISO image file into the virtualized DVD drive.

Follow these steps to install CentOS as a VM:

1 If not already opened, open the Oracle VirtualBox hypervisor app on your host system.

2 If you have multiple VMs configured in your hypervisor, click one time on the CentOS Server VM to select it.

3 Click the Settings button in the VirtualBox Manager's top‐right pane, which opens the Settings window for the CentOS Server VM.

4 In the Settings window, click Storage in the left pane to open the Storage Settings window for the CentOS Server. It will look similar to the following:

5 In the Storage Settings window's middle pane under Controller: IDE, click the word Empty to open the Attributes pane for the IDE optical drive.

6 In the Storage Settings window's Attributes pane, click the DVD image to produce a drop‐down menu, and select Choose/Create A Virtual Optical Disk. An Optical Disk Selector window will appear that looks similar to the following:

7 In the Optical Disk Selector window, click the Add icon, which will open the Windows Explorer utility, and you will see “Please choose an optical disk file” in the window's title bar.

8 Navigate to the location of your CentOS ISO image file, select the file by clicking it, and then click Open. The Optical Disk Selector window now looks similar to the following:

9 In the Optical Disk Selector window, click Choose, and you're returned to the Storage Settings window's Attributes pane with the CentOS ISO image filename displayed under Controller: IDE.

10 Click OK to keep the virtually loaded ISO image file and return to the main VirtualBox Manager window.

11 Boot your CentOS Server VM by clicking the Start button in the VirtualBox Manager's top‐right pane.You may see lots of messages go by on your screen. Let the process continue until you reach this window:

12 Press Enter to start the installation process.You may see several more messages go by on your screen. Let the process continue until you reach this window:

13 Using your arrow keys, select the language you prefer and press Enter. The next window, Installation Summary, will look similar to the following:

14 Click Network & Host Name to reach a screen that looks similar to this:

15 Within the Network & Host Name window, click the second Ethernet listed to select it. Now click Off in the screen's upper‐right corner to turn this network on. It should now look similar to this:

16 Still within the Network & Host Name window, click Done to save your settings and return to the Installation Summary screen.

17 Within the Installation Summary screen, click Installation Destination to reach a window that looks similar to this one:

18 Click Done in the Installation Destination window's upper‐left corner to accept the defaults and return to the Installation Summary screen.

19 Within the Installation Summary screen, click Software Selection to reach a window that looks similar to this one:

20 In the Base Environment pane, click the circle next to Server to select it. This selection chooses a CentOS server without any GUI elements, as is desired here.

21 Click Done in the Software Selection window to return to the Installation Summary screen.

22 At this point, the Begin Installation button in the Installation Summary window's lower‐right corner should no longer be grayed out. Click Begin Installation. The installation will start, and a Configuration window will appear that is similar to the following:

23 Click Root Password to reach a screen that looks similar to this:

24 In the Root Password field, type in a password for the root account. Be sure to choose one that you will remember!

25 Tab to the Confirm field, and type in the same password you entered in the previous step. If the passwords don't match, you will not be able to proceed past the next step, so type carefully!

26 Click Done in the upper‐left corner of the window to return to the Configuration window.

27 Click User Creation to reach a screen that looks similar to the following:

28 Within the Create User screen, type your first and last name in the Full Name field.

29 Tab to the User Name field, and type sysadmin.

30 Tab to the Password field, and type in a password. Be sure to choose one that you will remember!

31 Tab to the Confirm Password field, and type in the same password you entered in the previous step. If the passwords don't match, you will not be able to proceed past the next step, so type carefully!

32 Click Done in the upper‐left corner of the window to return to the Configuration window.

33 In the Configuration window, you may have to wait a while for the software to finish downloading and installing. When this part of the process is completed, you'll see a screen containing a “Complete!” message like this:

34 Because the CentOS ISO image file has not yet been removed from the virtual DVD drive, click the X in the VM's upper‐right corner. You'll receive the Close Virtual Machine screen, which looks similar to the following:

35 Click the circle next to Power Off The Machine.

36 Click OK to power off the CentOS Server virtual machine.

37 Click the Settings button in the VirtualBox Manager's top‐right pane, which opens the Settings window for the CentOS Server VM.

38 In the Settings window, click Storage in the left pane to open the Storage Settings window for the CentOS Server.

39 In the Storage Settings window's Attributes pane, click the DVD image to produce a drop‐down menu, and select Remove Disk From Virtual Drive in the Storage Devices pane. The Controller: IDE item should show Empty, similar to the following:

40 Click OK to return to the VirtualBox Manager window.

41 Boot your CentOS Server VM by clicking the Start button in the VirtualBox Manager's top‐right pane.You may see messages on your screen. Let the process continue until you reach this window:

42 In the localhost login field (which is for the username), type root and press Enter. The password field will then display.

43 In the password field, be aware that nothing will show as you type in your password. There are no symbols such as asterisks or dots shown. Type in the password you created for the root account earlier, and press Enter.

44 After you log into the system successfully, you'll receive a prompt similar to this:[root@localhost:~]#This prompt is where you enter your commands, and it's called the command‐line interface.The next several commands assume that your host machine is connected to a network.

45 Updating software on a newly installed Linux system is an important step, and before you begin this process, you can see whether there are any updates to perform. To do this, type dnf list upgrades and then press Enter. (Note that if no updates are listed, you can skip the next two steps.)

46 Once you receive the prompt, update the software by typing dnf upgrade and pressing Enter.

47 Whenever the software update process asks “Is this ok [y/N],” type y and press Enter.This software update may take a while, so go get a cup of coffee and check the latest statuses on social media.

48 When you receive the “Complete!” message and a command‐line prompt, the installation process is complete. Type poweroff at the prompt and press Enter to shut down the system.

Congratulations! You've installed CentOS as a VM within the VirtualBox hypervisor, and you can use this Red Hat distribution twin to learn more about RHEL. Now that the installation process is complete, it's a good idea to check and make sure everything is OK. We'll cover that next.

Mastering Linux System Administration

Подняться наверх