VMware installs CentOS 7 (2023 hot tutorial)

1. Download the CentOS image file

insert image description here

  • Tip: The download speed may be very slow directly using the browser. It is recommended that you copy the above download address to [Xunlei] for download, which will be much faster. The following are detailed steps:

insert image description here

  • After the above 3 steps are completed, you can click [Download Now] to download.

2. Install the virtual machine

  • Open VWware, click [File] in the upper left corner with the left mouse button, and then click [New Virtual Machine] (the shortcut key for this step is Ctrl + N).

insert image description here

  • Note: There is another situation: before this, your VMware may not have installed any virtual machine, your interface may be as follows, then you can directly click [Create a new virtual machine]:

insert image description here

  • Check [Typical], and then click [Next]:

insert image description here

  • Check [Install the operating system later], and then click [Next]:

insert image description here

  • Select [Linux] for the operating system, and select the version of your own image file for the version (mine is [CentOS 7 64-bit]). Then click [Next]:

insert image description here

  • [Virtual machine name] can be changed by yourself, then click [Browse] to select the installation path (personal choice), and finally click [Next]:

insert image description here

  • 【Maximum Disk Size】You can choose the default one 20, or change it according to your needs. Then check [Split the virtual disk into multiple files] (this is the default), and finally click [Next]:

insert image description here

  • Click [Finish]:

insert image description here

  • Return to the following interface:

insert image description here

3. Install CentOS 7

  • Click [CentOS 7 64-bit] with the left mouse button, which is the name of the virtual machine created in the previous step. Then click [CD/DVD (IDE) Auto Detect]:

insert image description here

  • Check [Use IOS image file], then click [Browse], select the CentOS image file downloaded in the first step, and finally click [OK]:

insert image description here

  • Click [CentOS 7 64-bit] with the left mouse button, which is the name of the virtual machine created in the previous step. Click [Start this virtual machine]:

insert image description here

  • Then the following interface will appear, we need to wait for a while:

insert image description here

  • After a period of waiting, the following interface will appear. Choose language, I personally strongly recommend choosing English, because it will be much more convenient for you to use Linux commands later, and then click [Continue]:

insert image description here

  • Select the first [INSTALLATION DESTINATION] under [SYSTEM]:

insert image description here

  • The default is enough, and then click [Done], as shown below:

insert image description here

  • After the previous step is completed, it will return to the following interface, and then click [SOFTWARE SELECTION] under [SOFTWARE]:

insert image description here

  • For those who are new to the system, it is recommended to choose a graphical interface, and click [Done] in the upper left corner after selection. However, the interface is generally not very useful for us, and the interface of CentOS is not easy to operate, so choose the minimum installation here:

insert image description here

insert image description here

  • Select the date and time, click [DATE & TIME]:

insert image description here

  • Select [shanghai], and then click [Done] in the upper left corner:

insert image description here

  • Click [Begin Installation] to start the installation:

insert image description here

  • Set rootaccount password, click [ROOT PASSWORD]:

insert image description here

  • set password:

insert image description here

  • After the password is set, enter the following interface and wait for a while:

insert image description here

  • After a period of time, return to the following interface and click [Finish configuration] in the lower right corner (sometimes this interface may not exist, just go to the next step):

insert image description here

  • Click [Reboot] in the lower right corner, that is, restart:

insert image description here

  • Enter the account name and password, the password is invisible, and then click Enter:

insert image description here

  • After the input is complete, enter the command line mode:

insert image description here

4. Configure the network

  • Because the network adapter mode set during installation is NATmode. There are two ways to configure here, one is to automatically obtain an IP, and the other is to obtain a fixed IP. (The following method is to automatically obtain an IP)
  • The first thing to ensure is that CentOS is in NATmode:

insert image description here

  • On the VMware interface, click [Virtual Network Edito] in [Edit]:

insert image description here

  • Click [NAT Settings], and then modify the gateway IP under the same network segment as the subnet IP, that is, the first three digits must be the same, that is, the 192.168.138last digit must be different (default is fine), and finally click [OK] to save the settings :

insert image description here
[Note]: The above steps can be skipped under normal circumstances, we just did a check. If your steps are strictly in accordance with the previous examples, there will be no problem with the above steps, so you can skip them.

  • Enter the network configuration file directory of the virtual machine, the command is cd /etc/sysconfig/network-scripts/, and use lsthe command to check whether there is ifcfg-XXXa configuration file with a name, if not, it means that the network card is not recognized, and you can only reinstall or change the version of the virtual machine (normally, there are, Don't worry):

insert image description here

  • Enter the file with vi ifcfg-ens33the command ifcfg-ens33. Press ito enter insertedit mode.
    Set BOOTPROTOas dhcp, ONBOOTset as yes, press Esc to enter the command mode, enter to :wqsave and exit:

insert image description here

  • After the configuration is complete, enter the command: service network restart, restart the network card to make the network card settings take effect, and then you can go online;
  • Enter ip addrto check the dynamically allocated IP, and you can find that it has been automatically allocated.

insert image description here

  • Finally, verify whether you can access the Internet normally, and enter the command ping www.baidu.com:

insert image description here

At this point, the installation is complete!

おすすめ

転載: blog.csdn.net/m0_51913750/article/details/131594908
おすすめ