Use Xshell to connect to the Linux virtual machine on VMware (graphic steps)

Use Xshell to connect to the Linux virtual machine on VMware (graphic steps)

Preface: I recently started to study the construction of Hadoop platform, so I installed VMware workstation pro on my local machine and created a Linux virtual machine (centos system). In order to facilitate switching between the local machine and the virtual machine, I plan to use Xshell to directly connect to the Linux virtual machine. Before this, you need to configure the network of the Linux virtual machine. Hence the following record.

step:

1. Check the network connection mode of the Linux virtual machine and make sure it is in NAT mode. (Since I am only connecting locally, I did not select bridge mode. Of course, the configuration of bridge mode will be different, so I will not go into details here)

2. In VMware workstation, click [Edit]-->[Virtual Network Editor] on the menu bar to open the Virtual Network Editor below. Select VMnet8 (NAT mode) and uncheck [Use local DHCP service...] (if checked, a dynamic IP will be set).

3. In the picture below, click NAT Settings.

Remember the subnet IP range in the figure above. As shown in the figure above, the virtual machine is in the range of 192.168.44.0~192.168.44.255.

Note: In the above figure, 192.168.44.2 is the gateway address, 192.168.44.255 is the broadcast address, and 192.168.44.0 is generally the network segment IP, so the three addresses 0, 2, and 255 cannot be set.

4. Set the IP, DNS and host name of the virtual machine

1) Set the IP address, subnet mask and gateway as shown below.

#vi /etc/sysconfig/network-scripts/ifcfg-ens* (*Depends on the actual situation, this article uses ens33)

BOOTPROTO=static

IPADDR=192.168.44.3

NETMASK=255.255.255.0

GATEWAY=192.168.44.2

ONBOOT=yes

ONBOOT: refers to whether the network card is activated when the system starts. The default is no. Setting it to yes means that the network card is activated when the system starts.

BOOTPROTO : Network allocation method, static. (Remember to change it to Static, otherwise you will not be able to connect to the network)

IPPADDR : Manually specify the IP address.

NETMASK : Subnet mask.

GATEWAY : Gateway IP address.

2) Set up DNS

#vi /etc/resolv.conf

3) Set the host name

#vi /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=hadoop01

#vim /etc/hostname

hadoop01

4) After the above files are configured successfully, restart the virtual machine or use the service network restart command to restart the network card.

#reboot

5. Set the IP properties of VMnet8 on Windows, as shown below. (Open Control Panel-->Network and Internet, click [Change adapter settings] on the right, and enter the "Network Connections" page)

6. After configuring the above steps, you can successfully use Xshell to connect to the Linux virtual machine.

7. Interlude: When vim and ifconfig commands cannot be found, use yum install net-tools/vim to install them.

#yum install -y net-tools

#yum install -y vim

This is the end of this article on how to use Xshell to connect to the Linux virtual machine on VMware. For more information about connecting Xshell to VMware Linux virtual machines, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Use xshell to connect to the Linux server
  • Solution to the problem that Xshell cannot connect to the virtualBox virtual machine
  • How to connect Xshell5 to Linux in a virtual machine and how to solve the failure
  • Use xshell to implement proxy function and test it with navicat for MySQL

<<:  Overview of the definition of HTC components after IE5.0

>>:  How to turn off eslint detection in vue (multiple methods)

Recommend

Web page printing thin line table + page printing ultimate strategy

When I was printing for a client recently, he aske...

Detailed explanation of grep and egrep commands in Linux

rep / egrep Syntax: grep [-cinvABC] 'word'...

Solution to Ubuntu cannot connect to the network

Effective solution for Ubuntu in virtual machine ...

Vue Element front-end application development to obtain back-end data

Table of contents Overview 1. Acquisition and pro...

Docker image compression and optimization operations

The reason why Docker is so popular nowadays is m...

Example of using JS to determine whether an element is an array

Here are the types of data that can be verified l...

How to smoothly upgrade nginx after compiling and installing nginx

After nginx is compiled and installed and used fo...

Specific operations of MYSQL scheduled clearing of backup data

1|0 Background Due to project requirements, each ...

Usage of mysql timestamp

Preface: Timestamp fields are often used in MySQL...

js implements single click to modify the table

Pure js implements a single-click editable table ...

Docker deploys net5 program to achieve cross-platform functions

Deployment environment: docker container, liunx s...

Sample code for using CSS to write a textured gradient background image

The page length in the project is about 2000px or...

Causes and solutions for slow MySQL query speed and poor performance

1. What affects database query speed? 1.1 Four fa...

How to use JavaScript to determine several common browsers through userAgent

Preface Usually when making h5 pages, you need to...

What kinds of MYSQL connection queries do you know?

Preface If the query information comes from multi...