[VMware] VMware installs CentOS8-Stream virtual machine

This article first appeared in Muxue’s Humble House

VMware installs CentOS8-Stream virtual machine

1.Install VMware

Since the latest version of VM costs money, here is an installation package for VMware16pro ; I know that the download speed of the disk is slow, but there really are no other options, sorry for that.

In the following, vm will be used to refer to VMware as abbreviation.

提取嘛: gdt9  
亚索包解押: 8888

After downloading the installation package, right-click and run as administrator , and select

image-20230612202907523

In the first selection box, click Next

image-20230612204411207

Check the box to accept the terms of the agreement and continue to the next step;

You need to check this page to add it to the system PATH, and you can choose the installation location yourself.

Note: I have kept the default C drive installation path unchanged, so I don’t know if changing it to other drives will cause other problems. If your C drive has enough space, install it on C drive!

image-20230612204444222

Remove the hooks for checking for product updates and joining the trial plan, next step

image-20230612204616790

The default shortcut is fine, you can change it yourself later. You must know this!

After clicking Next on this page, click Install and wait for the installation to complete.

image-20230612204651034

After the installation is completed, the following page will appear. Click 许可证to fill in the license key.

You can Baidu for the license key. There is a license code in the compressed package I shared . Just fill in that.

image-20230612204733244

After this step is completed, click Finish and the virtual machine software is successfully installed.

2. Download centos8 system iso

You can download it from two places. It is recommended to follow the instructions in this article and use the Alibaba Cloud image.

  • centos official website: https://www.centos.org/download/
  • Alibaba Cloud Mirror: http://mirrors.aliyun.com/centos/8-stream/isos/x86_64/

This article installs centos8-streamthe iso. Most of the Linux blogs written on this site are compatible with operations on this system! Here I choose the iso image pointed by the arrow.

为了避免后续的其他操作和本文不符,这里顺便也把iso镜像给上传了一个
https://pan.baidu.com/s/1jleRo4mxILq2RwSU-rxaaA 
提取嘛: t7ay

image-20230612205049383

3.Install Centos

3.1 Create a virtual machine

First, create an empty directory somewhere else on your computer’s hard drive.

image-20230612205711899

Open the main interface of the vm software and click to create a new virtual machine

image-20230612205834038

customize

image-20230612205931729

Keep the default here and do not need to modify it.

image-20230612205954545

iso selection

iso selects the centos8-stream virtual machine just downloaded

image-20230612210021735

operating system

Operating system selection linux and centos8

image-20230612210053039

Installation disk

Select the empty folder you just created (this is the installation path of the virtual machine files, so it is recommended to choose an empty disk on your computer to create the folder)

image-20230612210133820

Core selection

Please choose the number of cores according to your CPU. For example, my notebook CPU has 8 cores and 16 threads ( ctrl+alt+deleteopen your computer 任务管理器to check)

image-20230612210301077

Here I chose 4 cores and the number of cores was 2

Note that this needs to match the CPU of your computer. 8 cores and 16 threads means that each processor has 2 cores, so 2 should be selected. If it is a CPU with Intel's new large and small core design, you can also choose 2. Some older CPUs have one core and only one thread (for example, the n5105 has 4 cores and 4 threads)

image-20230612210415018

Memory

Depending on the memory selection of your computer, it is recommended to choose less than half of the total memory .

For example, if the computer is 16G, it is recommended to only select 8G. Otherwise, the virtual machine will take up too much memory and the laptop will be stuck, making it impossible to do anything else.

Here we also need to correct some misunderstandings of beginners. Memory refers to running memory , not the hard drive capacity of your computer! ! ! Right-click on your computer desktop 此电脑and click 属性to see how much memory your computer has.

image-20230612210814633

CentOS8 itself does not occupy much memory, but if you want to learn Linux programming operations in depth, you may later use vscode to remotely connect to the virtual machine. At this time, if the memory is too low, it will easily become stuck. So it is recommended to choose at least 2GB

Nowadays, computers all have 8G of memory, and 16GB is also common in notebooks at mainstream prices, so everyone’s notebooks can run virtual machines without any problem.

image-20230612211133064

network

Select bridge

image-20230612211247979

IO and disk

Choose the recommended one, no need to modify it

image-20230612211300638

Just choose the disk type recommended by vm (the recommendations may be different for different computers)

image-20230612211312031

image-20230612211413137

The disk size should be at least 20GB, and you can choose it according to the capacity of your computer’s hard drive. The selected hard drive capacity will not be filled immediately , but will slowly increase with use;

Virtual disk selects a single file

image-20230612211516916

Disk file names do not need to be modified

Finish

Check to see if there are any incorrect settings and click Finish.

image-20230612211549464

Click to start the virtual machine and centos is started.

3.2 Initialization

Click on the virtual machine screen and use 键盘the arrow keys to select the first install

image-20230612211726975

A lot of text will pop up. Wait for it to finish the installation process and you will reach the following interface.

language

You can choose the language as Chinese, but in order to facilitate subsequent learning and integration with other tools (most tools do not have Chinese), it is still recommended to choose English ! And this can be changed in the system, so it’s not a big problem

image-20230612211858158

network

click network

image-20230612213406535

Click the button in the upper left corner to open the connection, change the hostName to the one shown below, and applythen click on the upper left cornerDone

image-20230612212115703

Time zone

We are in the East Eighth District, so we have to select the corresponding time zone Asia/Shanghai, which is the time zone of Shanghai.

image-20230612213520901

Here you can also choose the NTP timing server (which is a server used to broadcast the current time). Click the gear under help. We can choose a domestic server to facilitate receiving time updates.

cn.pool.ntp.org

image-20230612213716819

Software selection

Then select software selection, here you choose the software to be installed and the operating method of the system.

Since most of the time we learn Linux command line operations , the command line installation method also places a smaller load on the host. You servercan choose here; do not check the ones on the right.

After selecting, click done in the upper left corner

image-20230612212314431

root password

Then click root passwordSettings. The root account is closed by default, which is not good for our learning. Set a password to facilitate subsequent connections!

image-20230612212412115

According to the sequence, after the above operations are completed, the installation in the lower right corner will no longer be gray and can be clicked.

If it appears installation destinationred, click in and then exit and it will be ok.

image-20230612212421879

Click and wait for it to be installed! Wait patiently, it takes quite a while.

image-20230612212500943

Some system content will also be downloaded here. I chose the one without gui server, so I only need to download 720MB. The one with gui will definitely be larger.

image-20230612212543128

Finish

Click on the lower right corner to restart the system

image-20230612214349590

3.3 Startup

Select the first one here (if you don’t select it for a long time, it will start by itself)

image-20230612214419514

After the following page appears, fill in your username and password and you will be logged in successfully!

image-20230612214506031

4.ssh connection

First download the ssh connection software, such as tabby, xshell, putty, etc.;

4.1 Install and start sshd

First operate in the virtual machine and download the ssh server software

yum install -y openssh-server

The system you are currently using already comes with this software.

image-20230612214831707

start sshd

systemctl start sshd

4.2 View IP

ifconfig

Using this command, you can see that the IP address of the current virtual machine is192.168.6.172

image-20230612214942068

4.3 Connection

Taking tabby as an example, click Settings, Configuration and Connection, New Configuration

image-20230612215039444

Select ssh connection

image-20230612215111073

Fill in the IP you just saw. Port 22 does not need to be touched by default. The username is root.

image-20230612215144144

Click the start button to start connecting

image-20230612215159272

The following page will appear. Fill in the root password here and check rememberRemember password.

image-20230612215212847

Key verification will appear every time SSH connects to a new host for the first time. Just check the box to accept it and remember it .

image-20230612215232271

At this point, you have successfully connected to Linux in the virtual machine. It is also recommended to operate the Linux command line in the SSH software instead of the virtual machine interface of the VM.

image-20230612215306344

In this way, the vm window can be closed and the virtual machine can run in the background!

image-20230612215359618

Over!

You're done, a Linux learning environment is set up.

By the way, take a look at the following content

  • Centos8 installs python3.10 https://blog.musnow.top/posts/847195816/
  • Centos7 cloud server learning environment initialization https://blog.musnow.top/posts/656771008/

Guess you like

Origin blog.csdn.net/muxuen/article/details/131218053