Installation and configuration of CentOS under VMware 17 Player

This article records in detail the installation of VMware 17 Player and the installation of the Centos virtual machine; the content includes the entire download and installation process; it also includes some basic application testing instructions.

Install VMware Player

VMware Player download

  • Click to download: https://www.vmware.com/go/getplayer-win

  • Find the version on the official website:

    • Enter the official website: https://www.vmware.com/

    • Select product tab
      Insert image description here

    • Scroll to the bottom to view all products

      Insert image description here

    • Find the desktop hypervisor and select VMware Workstation Player; VMware Workstation Player is a free version and can be used for personal, non-commercial use. VMware Workstation Pro is a paid version that provides more functions and advanced features and is suitable for business environments or professional developers. In addition, VMware also provides a variety of other products and solutions, including server virtualization, cloud computing and enterprise-level software.

      Insert image description here

    • Click the download button

    Insert image description here

    • It's easier to find the one at the back

VMware installation

  • Directly run the downloaded exe installation package

  • Click next

Insert image description here

  • Accept and click Next

Insert image description here

  • There will be a compatibility check here, select Automatically install WHP and click Next;

Insert image description here

The installer has detected that your host has Hyper-V or Device/Credential Guard enabled, and running VMware Workstation 17 Player on a host with these features enabled requires additional configuration.

You can follow these steps to resolve this issue:

  1. Open Control Panel: You can search for "Control Panel" in the Start menu and open it.
  2. In Control Panel, select "Programs" or "Programs and Features" (depending on your version of Windows).
  3. In the list of programs, click "Turn Windows features on or off." It may take some time to load.
  4. In the Windows Features window, find the options for Hyper-V or Virtual Machine Platform and uncheck them.
  5. If you see the "Windows Hypervisor Platform" option, make sure it is checked.
  6. Click "OK" to save the changes and wait for the system to complete the necessary configuration changes.
  7. After completing the above steps, restart your computer.

By doing this, you will disable Hyper-V and Device/Credential Guard, while enabling Windows Hypervisor Platform (WHP). This will allow you to run VMware Workstation 17 Player on a WHP-enabled host.

  • Switch installation directory

Insert image description here

  • Experience settings, it doesn’t matter if you choose or not

Insert image description here

  • Whether to create shortcuts and other content

Insert image description here

  • Just start the installation

Insert image description here

  • finish installation

Insert image description here

At this point, the installation of VMware has been completed .

InstallContos

Installation package download

  • Official website address: https://www.centos.org/ , this will definitely be super slow

  • Mirror address

    1. Alibaba Cloud (Aliyun): You can visit Alibaba Cloud's mirror site ( https://mirrors.aliyun.com/centos ), search for and download the required CentOS ISO image on the site.
    2. NetEase (163): You can also visit NetEase's mirror site ( http://mirrors.163.com/centos ), where you can find and download the CentOS ISO image that applies to you.
    3. Tsinghua University (TUNA): Tsinghua University provides a CentOS mirror download service. You can visit its mirror site ( https://mirrors.tuna.tsinghua.edu.cn/centos ) to find and download the CentOS ISO mirror that suits you.
  • Download the installation package

    • Versions below 8.0

      Find the isos directory of the corresponding version, select the version to download;

      Insert image description here

    • Version selection (just choose DVD)

      CentOS provides different versions of image files to meet the different needs of users. Here are the brief differences between the versions:

      1. Everything: Everything is a complete CentOS installation media, including all software packages and components. It is a very large installation image that contains various components such as graphical interface, server and other commonly used software. This is a good option if you want to install CentOS once and don't want to download additional packages afterwards.
      2. DVD: DVD is an installation medium similar to Everything, but smaller. It also contains a complete installation of the CentOS operating system, but does not include some additional packages in Everything. DVD installation images are often used for installations where there is no Internet connection or a slow network connection.
      3. Minimal: Minimal is a relatively small installation media that only contains the most basic parts of the CentOS operating system. It only provides some core software and components, such as basic command line tools and system services. When installing using Minimal installation media, you need to manually install additional packages after the installation is complete to meet specific needs. This is a common choice for users who require a customized server environment or want a streamlined installation.
      4. netinstall: netinstall is a very small installation media that contains only the most basic files needed to start the installation process. When using netinstall, you need to download the remaining packages and components over the network. It is typically used for installation without physical installation media (such as a CD or USB) but with a stable internet connection. Using netinstall ensures that you always get the latest versions of software packages and can select the set of packages to install as needed.
    • Version 8.0 and above

      Among CentOS releases, there are two main branches: CentOS Stream and CentOS Standard. There are some differences between them:

      1. CentOS Stream: CentOS Stream is a continuously updated distribution that provides the latest packages and features. It is located at the "upstream" position in the RHEL development process, allowing users to test and adopt new features of RHEL earlier. CentOS Stream is considered a springboard version that will change the process from Fedora to RHEL. CentOS Stream provides faster software updates while also accepting user feedback.
      2. CentOS Standard Edition: CentOS Standard Edition is a stable version based on the RHEL release label. It provides the same packages and features as RHEL, but there is some lag (usually a few months) in the release of RHEL. CentOS Standard Edition is committed to providing a reliable, free, enterprise-class operating system suitable for production environments.

      What needs to be made clear is that versions before CentOS 8.0 still use the traditional CentOS release model, while CentOS 8.0 and later versions introduce CentOS Stream, and releases after CentOS 8.0 will be managed based on CentOS Stream. This means that CentOS 8.0 and above are no longer strictly a reconstruction of RHEL, but closer to a real-time version during the development process of RHEL.

      Therefore, when choosing a CentOS version, you can choose CentOS Stream or CentOS Standard Edition according to your needs and preferences. CentOS Stream provides faster updates and earlier access to features, while CentOS Standard Edition focuses on stability and reliability.

    • Here we can directly download the version in the 8.0 stream

    Insert image description here

Install virtual machine

  • Select Create new virtual machine
    Insert image description here

  • Select to install the operating system later and click Next

Insert image description here

  • Select operating system version

Insert image description here

  • Set the name of the virtual machine and the installation location of the virtual machine

Insert image description here

  • Set disk size

In VMware, when you install a virtual machine, you can choose to store the virtual machine disk as a single file or as multiple files. Here are the differences between them:

  1. Single file: When you choose to store the virtual machine disk as a single file, the entire virtual machine disk (usually a .vmdk file) is saved as a single file. All virtual machine data, including operating system, applications, and user data, are stored in this file. This file makes it easy to move, copy, or back up an entire virtual machine.
  2. Multiple files: When you choose to store the virtual machine disk as multiple files, the virtual machine disk will be split into multiple files, and each file stores a portion of the virtual machine data. Typically, a main virtual disk file (.vmdk) will be created, as well as some auxiliary files, such as .vmx files describing virtual hardware configuration, .vmem files storing virtual machine memory status, etc. In this way, information about different parts of the virtual machine is stored in different files.

These two storage methods have their own advantages and disadvantages:

  • The advantage of a single file is that it facilitates management and backup. You only need to process one file to migrate or copy an entire virtual machine. In addition, a single file can provide performance benefits because all virtual machine data is stored in a contiguous file, which can increase read and write speeds.
  • The advantage of multiple files is that they are more flexible and you can work with different parts of the virtual machine more precisely. For example, you can back up a virtual machine configuration file or snapshot file individually without backing up the entire virtual machine disk. Additionally, multiple files may also provide better performance in some cases.

Insert image description here

  • Click on Customize Hardware Configuration

Insert image description here

  • Set the memory, normal 2G is enough

Insert image description here

  • Set the number of cores according to requirements and device hardware status

Press ctrl+shift+esc to open the task manager to view the number of CPU cores of the current device;

Insert image description here

Insert image description here

  • Set iso image file;

Insert image description here

  • After clicking Close, the virtual machine is created;

Insert image description here

Centos installation configuration

  • Click Play Virtual Machine to start the virtual machine

Insert image description here

  • Wait for system countdown

Insert image description here

  • Start the installation

Insert image description here

  • Configure system language

Insert image description here

  • Software selection, that is, choosing which version to install

Insert image description here

  • There are several options here. If you don’t know what to choose, just choose the first one. I choose the second one here. It is a server without a GUI interface and relies on commands to operate;

Insert image description here

  • Installation destination

Insert image description here

  • This is to partition and mount the disk just allocated. Generally, you can choose automatic partitioning. You can learn the details;

Insert image description here

  • Network and hostname configuration

Insert image description here

  • Open Network and locally accessible interfaces will be automatically detected and listed in the left pane. You can select a network and activate (or deactivate) it, without which the server cannot access the network;

    A hostname is a name used to identify a computer on a network. It plays an important role in network communication, as follows:

    1. System Identification : The host name is used in the operating system to identify and identify a specific computer. It can help you distinguish and manage different hosts in the network. By setting a meaningful hostname, you can more easily identify and manage your CentOS host.
    2. Network Connection : Hostname is very important for network connection. When you connect to a network, other computers can find and identify your computer based on its hostname. Within a LAN, hostnames can be used for internal communication and shared resources. In addition, if your CentOS host needs to communicate with other devices over the network (such as remote login or access to shared folders), other devices can also use the host name to identify and connect to your host.
    3. Logging and Troubleshooting : In system logs, hostname plays an important role. When you view system logs, hostnames can be used to identify different computers for troubleshooting and monitoring purposes. Additionally, in an environment where multiple servers work together, each server has its own hostname, which helps distinguish and track specific server logs.

Insert image description here

The configuration of the network and host name is actually very important, but there is no need to worry about configuring everything here. You can just adjust it when you need to adjust it later; a simple record will be made later in this article;

  • Date and time configuration

Insert image description here

  • Change to Shanghai time zone

Insert image description here

  • Set root password

Insert image description here

  • Just set a password as needed

Insert image description here

  • After setting the password, click to start the installation, and then wait for a long time for the installation~

Insert image description here

  • Finally completed, click Restart

Insert image description here

  • Just select the first one and press Enter or wait for startup;
    Insert image description here

  • Enter the account name and password and press Enter. The display switches to the corresponding user, and the installation is completed; (this will differ according to the software installation version selected previously, that is, whether there is an interface)

Insert image description here

Test installation

  • Test network connection

    Directly ping the Internet resource to check whether it can be connected normally. As shown below, the network link is normal;

Insert image description here

Or use ifconfigor ip addr showto view the configuration information of the network interface and confirm whether the network interface has been activated and obtained the correct IP address. The normal configuration is completed as follows;

Insert image description here

  • View current system version

    cat /etc/redhat-releaseJust enter the command

Insert image description here

Application testing

Hostname and network configuration

CPU name

As mentioned above, the host name plays an important role in network communication, domain name resolution, system identification, service identification, and logging.

How to check the hostname?

In CentOS, you can use the following command to view the current hostname:

hostname

After executing the command, it will return the hostname of the current computer.

Insert image description here

Alternatively, you can /etc/hostnameview or change the hostname by editing the file. Open the file with a text editor:

vi /etc/hostname

In the file you will find the current hostname. After saving and closing the file, you can view or modify the hostname.

Note that changing the hostname may need to be performed with root privileges, and after modifying the hostname, some network services may need to be restarted for the change to take effect.

as follows:

Insert image description here

  • What is the impact of the host name ?.

    Like the original localhost.centos8, using a dot (.) in a hostname is common practice, especially in a LAN or Internet environment. The period is used to separate different parts of the hostname. On a local network, the dot in the hostname doesn't have much impact. They mainly come into play during network communications or Internet connections with other computers.

Network Configuration

It must be said here that VMware workstation Player does not have a virtual network editor ;

If you are VMware Pro, you can refer to the next article: Centos 8 virtual machine network configuration and cloning under VMware Pro

I also discovered this after a long time of tossing. The network configuration of the VMware Pro I had been using before was very smooth. Now with this free version, I thought it had all the basic functions, but I didn’t expect the gap to be so big;

VMware ProWhen configuring a subnet IP address in the Virtual Network Editor, you can select a given subnet mask and network address to create an independent virtual network subnet. This means that multiple independent networks can be simulated in VMware Workstation Pro and virtual machines can be run within each network.

The free version of Player has limited configurable controls. So how to fix the IP of the virtual machine and make it accessible to the host? The answer is, it has obviously been fixed!

Reference link: http://t.csdn.cn/2nIAn

Xshell connection

  • First check the virtual machine IP and enter ifconfigit

Insert image description here

  • Xshell creates a new session, enter the name and host, the host is the IP address we found in the above step;

Insert image description here

  • Click Connect and enter your username

Insert image description here

  • enter password

Insert image description here

  • Done

Insert image description here

There is still a big gap between VMware Player and VMware Pro. If you are not a fan of software, it is better to download the whole pro version from Baidu online.


Thanks for reading!

Original link: Jiu Mo Zhai - Installation and configuration of CentOS under VMware 17 Player

Welcome to follow the blogger’s personal mini program!

Guess you like

Origin blog.csdn.net/qq_45730223/article/details/132451449