Mac VMware Fusion CentOS7 configuration static IP tutorial diagram

Mac VMware Fusion CentOS7 configuration static IP tutorial diagram

Install CentOS7

Here we want to install CentOS7 64-bit, so choose CentOS7 64-bit configuration

After we click on storage, vmware will automatically create a virtual machine for us, but we haven't added the image yet, so we need to shut it down first

Set up an image for the newly created virtual machine

Here is the reason why it is set to English. English is a more international language. If the system has problems after setting it to English, the error prompt will be in English. It is easier to search for solutions on the Internet through English error prompts. If errors occur in Chinese, it is more difficult to find solutions.

Set the time zone. The default is New York. Change it to Shanghai, China.

Configuring Static IP

1. Change the network configuration to NAT mode

Enter VMware Fusion's vmnet8 directory through the Mac terminal

cd /Library/Preferences/VMware\ Fusion/vmnet8

View the contents of nat.conf

cat nat.conf

Remember the data in the red box, which will be used in the following configuration

View cat dhcpd.conf

cat dhcpd.conf

Note that range is the static IP address range that the virtual machine is allowed to select. The custom static IP address must be within this range (this article intends to use 172.16.104.130 as an example)

Get DNS (in mac system preferences -> network ->)

Login to CentOS7

Enter the network-scripts directory of the virtual machine

cd /etc/sysconfig/network-scripts

Find the file starting with ifcfg-en. In the picture above, mine is ifcfg-ens33.

Edit the file using vi

The following figure is the default configuration

We change it to the following configuration

After saving, restart the service to make the changes take effect

service network restart

Ping Baidu to see, successfully pinged

Next, we can connect remotely through tools such as SecureCRT. Please remember that if you change the place where you go to access the Internet, you may find that your virtual machine is not connected. This is because the DNS address has changed. At this time, you only need to edit the ifcfg-enxxx file again and add the DNS address of your current network.

like:

DNS1=192.168.0.1DNS2=114.114.114.114

Let's test it through SecureCRT connection

Summarize

The above is the tutorial on how to configure static IP for Mac VMware Fusion CentOS7 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Getting Started with VMware Fusion Virtual Machines on Mac
  • How to set up VMWare Fusion network on MAC
  • Install VMware Fusion and CentOS-7 on Mac

<<:  Example code for implementing an Upload component using Vue3

>>:  Test and solution for MySQL's large memory usage and high CPU usage

Recommend

How to filter out certain libraries during mysql full backup

Use the --all-database parameter when performing ...

How to encapsulate axios in Vue

Table of contents 1. Installation 1. Introduction...

Record the steps of using mqtt server to realize instant communication in vue

MQTT Protocol MQTT (Message Queuing Telemetry Tra...

Using loops in awk

Let's learn about different types of loops th...

Implementation and optimization of MySql subquery IN

Table of contents Why is IN slow? Which is faster...

jQuery implements sliding tab

This article example shares the specific code of ...

How to change MySQL character set utf8 to utf8mb4

For MySQL 5.5, if the character set is not set, t...

How to set up virtual directories and configure virtual paths in Tomcat 7.0

Tomcat7.0 sets virtual directory (1) Currently, o...

Tudou.com front-end overview

1. Division of labor and process <br />At T...

Teach you how to deploy Vue project with Docker

1.Write in front: As a lightweight virtualization...

When is it appropriate to use dl, dt, and dd?

dl:Definition list Definition List dt:Definition t...

Solution to the error in compiling LVGL emulator on Linux

Table of contents 1. Error phenomenon 2. Error An...

Several implementation methods of the tab bar (recommended)

Tabs: Category + Description Tag bar: Category =&...

A brief analysis of how MySQL implements transaction isolation

Table of contents 1. Introduction 2. RC and RR is...