Install CentOs 7 in the virtual machine VMware and use Xshell to connect

1. Install virtual machine VMware-Workstation

If VMware is already installed, you can skip this step

Installation tutorial: (22 messages) Virtual machine VMware-Workstation-pro 17 download and installation_Cold Herbal Tea's Blog-CSDN Blog

2. CentOs7 DVD installation

Centos installation package download_Open source mirror station-Alibaba Cloud (aliyun.com)

Found version 7.9.2009

image-20230618114245205

clickisos

image-20230618114616999

image-20230618114628787

There are different versions here, the differences are as follows

  1. CentOS ISO: DVD is a standard installation disk. You can generally download this. It contains a large number of commonly used software. In most cases, there is no need to download it online during installation. The size is 4G;
  2. Minimal ISO: a streamlined version, including core components, with a size of just over 600 MB;
  3. Everything ISO: As the name suggests, it includes all software components. Of course, it is also huge in size, up to 7G. Supplement the software on the full version installation disk and integrate all software;
  4. NetInstall ISO: network installation image;
  5. LiveGNOME ISO: GNOME desktop version;
  6. LiveKDE ISO: KDE desktop version;
  7. LiveCD ISO: a system running on a CD, similar to winpe;

Install the DVD version here

image-20230618115629438

3. Create a virtual machine

Open VMware Workstation Pro and click Create Virtual Machine

image-20230618120056063

Select typical and next step

image-20230618120136904

Choose to install the operating system later, next step

image-20230618120213043

Select Linux, select CentOS 7 64-bit, and click Next

image-20230618120315355

According to your needs, you need to change the name and location, then click Next

image-20230618120443614

Continue to the next step

image-20230618120522520

Click on Customize Hardware

image-20230618120603517

Modify the memory and processor, change the memory to 2G

image-20230618120752071

Select the new CD/DVD, use the ISO image file, select the iso file you just downloaded, and then click Close

image-20230618121006599

Finish

image-20230618121145481

Start the virtual machine, select Install CentOS 7, and press Enter

Move the mouse inside the virtual machine and click or press Ctrl + G to move the mouse into the virtual machine.

Press Ctrl + Alt to move the mouse out of the virtual machine

image-20230618121308209

Wait for installation, select Chinese and continue

image-20230618121542006

Click on the installation location and click Finish after entering.

image-20230618121649840

image-20230618121711048

Click on software selection

image-20230618121743313

Select GNOME Desktop, check GNOME Applications, Development Tools, Security Tools, and click Finish in the upper left corner

image-20230618121930216

Click to start installation

image-20230618122016046

Configure and set a password and create a user

image-20230618122237796

password setting

image-20230618122404310

Create user

image-20230618122417623

Waiting for installation

image-20230618122457762

After the installation is complete, click Restart

image-20230618134536712

Accept license agreement

image-20230618134704585

image-20230618134719093

Click Network and Host, set up the network, note that Ethernet is turned off

image-20230618134950499

Click to complete configuration

image-20230618135028196

Click to log in to your account

image-20230618135110390

After the configuration, select forward and skip, and the installation is completed.

image-20230618135252457

4. Use Xshell to connect to CentOs

Xshell can be installed by itself, here is a blog

(22 messages) Xshell download and installation tutorial for newbies (super detailed)_xshell download_novice programmers’ blog on the road to climbing-CSDN blog

Open the virtual network editor of the virtual machine. In the editor, remember the IP and subnet mask.

image-20230618141831763

Click NAT settings and remember the gateway

image-20230618142042490

Get the ip address of the virtual machine

ip addr

If you have a desktop version, right-click to open the terminal.

image-20230618135547588

Enter command line

vi /etc/sysconfig/network-scripts/ifcfg-ens33

Use ito enter modification mode

Modify two places, the last ONBOOT=yes, BOOTPROTO=static

image-20230618142335753

IPADDR=192.168.160.33
NETMASK=255.255.255.0
PREFIX=24
GATEWAY=192.168.160.2
DNS1=114.114.114.114

Then modify the above address according to the previous IP address (IP address, DNS, default gateway and subnet mask need to be in the same IP segment as previously set), and then insert it at the end

image-20230618142527166

Save, press Esc and enter:w ! sudo tee %

Restart CentOs 7 , restart the client

image-20230618151408301

Open xshell, click New, enter the name (custom), enter the host (IPADDR set above, such as 192.168.160.33 here), the port number is generally 22

image-20230618151640726

Accept and save

image-20230618151813906

Username rootimage-20230618151833244

The password is the password set during the previous virtual machine installation.

image-20230618151905679

connection succeeded

image-20230618151939596

Guess you like

Origin blog.csdn.net/weixin_62726289/article/details/131272444