Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Essential Linux Commands

You're reading from   Essential Linux Commands 100 Linux commands every system administrator should know

Arrow left icon
Product type Paperback
Published in Nov 2023
Publisher Packt
ISBN-13 9781803239033
Length 250 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Paul Olushile Paul Olushile
Author Profile Icon Paul Olushile
Paul Olushile
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1:Server Installations and Management Commands
2. Chapter 1: Getting a CentOS Server Up and Running FREE CHAPTER 3. Chapter 2: Linux User and Group Commands 4. Chapter 3: File Compression and Archival Commands 5. Part 2:Frequently Used Commands – Part 1
6. Chapter 4: Format and Disk Space Commands 7. Chapter 5: Linux Permissions Commands 8. Chapter 6: Filesystem Mount and Manipulation Commands 9. Part 3:Frequently Used Commands – Part 2
10. Chapter 7: File Content and Conversion Commands 11. Chapter 8: Linux SWAP Commands 12. Chapter 9: Linux Monitoring and Debugging Commands 13. Chapter 10: Linux IPTABLES and Network Commands 14. Chapter 11: File Transfer, Downloading, and Managing Log Files 15. Part 4:Linux Security and the Cloud
16. Chapter 12: Exploring Linux Security 17. Chapter 13: Linux in the Cloud 18. Index 19. Other Books You May Enjoy

Downloading and setting up a hypervisor

In this section, we will cover the process of downloading and setting up a hypervisor. A hypervisor is software that allows you to create and run virtual machines on a physical host. This is essential knowledge for a system administrator, as it allows for more flexibility and resource management. There are several hypervisors available, such as VMware, VirtualBox, and Hyper-V. In this book, we will be using VMware as an example.

Figure 1.5 – VMWare (Workstation 16 Pro)

Figure 1.5 – VMWare (Workstation 16 Pro)

The steps for downloading and setting up a hypervisor are as follows:

  1. The first step is to download the VMware software from the official website:
Figure 1.6 – Downloading VMWare Workstation

Figure 1.6 – Downloading VMWare Workstation

  1. Make sure to download the correct version for your operating system. Once the download is complete, you will need to install the software on your physical host. This process is straightforward and involves following the prompts during the installation process.
Figure 1.7 – Setting up

Figure 1.7 – Setting up

Once the installation is complete, you will need to create a new virtual machine.

  1. We’ll utilize the Custom configuration wizard. This process involves specifying the amount of memory and storage and the network settings for the virtual machine.
Figure 1.8 – Custom configuration wizard

Figure 1.8 – Custom configuration wizard

  1. Configure the Virtual machine hardware compatibility settings as follows:
Figure 1.9 – Hardware compatibility settings

Figure 1.9 – Hardware compatibility settings

  1. Choose the operating system media, then choose the I will install the operating system later option for a hands-on setup process:
Figure 1.10 – Choosing the operating system media

Figure 1.10 – Choosing the operating system media

  1. Provide a name for the virtual machine and choose a location.
Figure 1.11 – Choosing a virtual machine name

Figure 1.11 – Choosing a virtual machine name

  1. Select a guest operating system:
Figure 1.12 – Selecting a guest operating system

Figure 1.12 – Selecting a guest operating system

  1. Allocate processor resources:
Figure 1.13 – Specifying the number of processors to allocate

Figure 1.13 – Specifying the number of processors to allocate

  1. Allocate memory to the virtual machine. Calculating memory allocation should be approached in the same manner as processor allocation. Ensure that the host system has adequate memory and allocate the remainder to the virtual machine. For this example, we’ll be going with 8 GB or more.
Figure 1.14 – Specifying the amount of memory

Figure 1.14 – Specifying the amount of memory

  1. Configure the network settings. Choose the network configurations that meet your needs, or just select the default NAT Network. Why do this?

    Network address translation (NAT) in VMware is a networking feature that allows virtual machines to access the internet and other network resources with the use of a host computer’s IP address. This feature provides a secure and convenient way to access the internet for virtual machines that do not have their own IP addresses. In NAT mode, the virtual machine’s network traffic is transparently translated between the virtual network and the host’s physical network, allowing the virtual machine to access network resources as if it were directly connected to the physical network. NAT is often used in virtualization environments for testing and development, where virtual machines need access to the internet for downloading software, updates, and so on but do not require public access.

Figure 1.15 – Network type

Figure 1.15 – Network type

  1. Select the I/O controller type.

    The SCSI controller type is the type of controller that is used to control a virtual disk. The following figure contains these options:

    • BusLogic: This controller type is not available for 64-bit guests. It is an older controller type that is no longer commonly used.
    • LSI Logic (recommended): This controller type is recommended for most guests. It is a newer controller type that offers better performance and compatibility than the BusLogic controller.
    • LSI Logic SAS: This controller type is designed for use with Serial Attached SCSI (SAS) disks. It offers better performance than the LSI Logic controller, but it is not as widely supported by guest operating systems.
    • Paravirtualized SCSI: This controller type is a high-performance controller that is designed for use with VMware guest operating systems. It requires that the guest operating system have a special driver installed.

    If you are not sure which SCSI controller type to choose, I recommend using the LSI Logic controller. It is a good all-purpose controller that is widely supported by guest operating systems.

Figure 1.16 – I/O controller types

Figure 1.16 – I/O controller types

  1. Choose the disk type.

    The screenshot that follows shows the different disk type options available in the New Virtual Machine Wizard window. The options are as follows:

    • Integrated Drive Electronics (IDE): This is an older disk type that is not as fast as newer disk types, such as SATA and NVMe. However, it is still supported by most guest operating systems.
    • Small Computer Systems Interface (SCSI): This is a faster disk type than IDE. It is also more versatile, as it can support multiple disks and devices.
    • Serial ATA (SATA): This is the most common disk type in use today. It is faster and more reliable than IDE and SCSI.
    • Open non-volatile memory express (ONVMe): This is the newest and fastest disk type. It is still under development, but it is becoming increasingly popular in high-performance servers and workstations.

    If you are running a guest operating system that supports newer disk types, such as SATA and NVMe, then I recommend choosing one of those disk types. They will offer better performance and reliability.

Figure 1.17 – Disk type

Figure 1.17 – Disk type

  1. Select a virtual disk (select the virtual disk if you have one, or create one).
Figure 1.18 – Creating a new virtual disk

Figure 1.18 – Creating a new virtual disk

  1. Specify the disk capacity. The recommended disk space is 20 GB, but we’ll be allocating 30 GB of space to ensure sufficient room for your virtual machine. Be sure to tick the Store virtual disk as a single file option.
Figure 1.19 – Setting the disk capacity

Figure 1.19 – Setting the disk capacity

  1. Define the virtual disk file.
Figure 1.20 – Specify Disk File

Figure 1.20 – Specify Disk File

  1. Create the virtual machine by selecting Finish.
Figure 1.21 – Ready to Create Virtual Machine

Figure 1.21 – Ready to Create Virtual Machine

  1. Next, to initiate the CentOS installation on VMware Workstation, provide the virtual machine with the CentOS ISO image. Once you’ve done this, click on the Power on this virtual machine option. This will create a new virtual machine and configure it according to the specifications you have provided.
Figure 1.22 – Selecting the ISO image file

Figure 1.22 – Selecting the ISO image file

After the installation is complete, you will power on the newly created virtual machine, which will boot up and be ready for use. This process will allow you to have a fully functional CentOS installation running within a virtual environment, providing you with the ability to easily test, run, and manage multiple operating systems on a single physical machine.

The next step is to power on the virtual machine. This will bring the newly installed operating system to life and allow you to start configuring and using it. It is important to ensure that the virtual machine is properly configured before proceeding with the power-on process. This includes verifying the network configuration, memory and processor allocation, and disk space availability. Once you have confirmed that all the necessary parameters are set up correctly, you can power on the virtual machine by clicking the Power On button in VMware Workstation. This will move us into the next stage of the configuration process.

  1. We’ll select Install CentOS Stream 8-Stream from the list of options. To navigate between the options, use the arrow keys and press the Enter key to select the desired one.
Figure 1.23 – Powering on CentOS 8-Stream

Figure 1.23 – Powering on CentOS 8-Stream

  1. Upon successful initiation of the CentOS installation, you will be presented with a welcome screen that gives you the option to choose your preferred language. Simply select your desired language and click Continue to proceed.
Figure 1.24 – Choosing your preferred language

Figure 1.24 – Choosing your preferred language

  1. To move forward with the installation of CentOS, it is important to set up certain parameters such as keyboard layout, language support, time and date settings, software packages to be installed, root password, installation media, and disk partition information. These parameters will ensure a smooth and successful installation.
Figure 1.25 – The installation summary

Figure 1.25 – The installation summary

  1. The installation wizard in CentOS 8 can automatically detect all the locally accessible network interfaces prior to the installation process. These interfaces will be displayed in the left pane (see Figure 1.26), allowing you to easily choose the desired network and configure it as active or inactive based on your specific requirements. This step ensures that the correct network connection is established for the system during the installation process.
Figure 1.26 – The Network & Host Name page

Figure 1.26 – The Network & Host Name page

  1. With all the necessary settings configured, it’s time to commence the installation process. Click the Begin Installation button:
Figure 1.27 – The Begin Installation button

Figure 1.27 – The Begin Installation button

As the installation process begins, the setup wizard will commence the installation of CentOS. The process may take several minutes to complete, depending on the speed of your system and the configuration settings selected. Keep an eye on the progress bar to track the installation’s progress.

Figure 1.28 – Installation progress

Figure 1.28 – Installation progress

  1. After the successful installation of CentOS, it’s important to reboot the virtual machine to ensure that all changes made during the installation process take effect. This will help in initializing the newly installed operating system and making it ready to use. To reboot the virtual machine, simply select the Reboot System button to restart from the system menu and wait for the machine to complete the reboot process.
Figure 1.29 – The Reboot System button

Figure 1.29 – The Reboot System button

  1. Upon rebooting the virtual machine, select the first option presented in the GRUB menu for successful boot into the installed CentOS operating system.
Figure 1.30 – The CentOS 8 GRUB menu

Figure 1.30 – The CentOS 8 GRUB menu

  1. One more important step to remember is to read and accept the license information, as it is required to proceed with the boot process.
Figure 1.31 – Accepting the license information

Figure 1.31 – Accepting the license information

  1. Upon accepting the license information, the final step in the process is to complete the configuration by clicking the Finish Configuration button. This action finalizes the setup and configuration process and enables the system to boot into the newly installed CentOS operating system.
Figure 1.32 – Finishing the configuration

Figure 1.32 – Finishing the configuration

  1. With your credentials, log in to your newly installed CentOS Linux system.
Figure 1.33 – Logging in

Figure 1.33 – Logging in

  1. Upon logging in, select the Start Using CentOS Linux option to begin utilizing the full functionality of the operating system.
Figure 1.34 – Ready to Go

Figure 1.34 – Ready to Go

It is recommended that you log in as the root superuser as soon as possible and run the commands in the next section to ensure your newly installed CentOS Linux system has the latest updates and fixes.

You have been reading a chapter from
Essential Linux Commands
Published in: Nov 2023
Publisher: Packt
ISBN-13: 9781803239033
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image