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

Tomcat uses Log4j to output catalina.out log

Tomcat's default log uses java.util.logging, ...

Detailed explanation of slots in Vue

The reuse of code in vue provides us with mixnis....

HTML+CSS to achieve surround reflection loading effect

This article mainly introduces the implementation...

What are the core modules of node.js

Table of contents Global Object Global objects an...

The submit event of the form does not respond

1. Problem description <br />When JS is use...

JavaScript parseInt() and Number() difference case study

Learning objectives: The two functions parseInt()...

Vue achieves seamless carousel effect

This article shares the specific code of Vue to a...

Implementation of MySQL Shell import_table data import

Table of contents 1. Introduction to import_table...

How to successfully retrieve VMware Esxi root password after forgetting it

Prepare a CentOS6 installation disk (any version)...

Solution to MySQL being unable to start due to excessive memory configuration

Problem Description MySQL reports an error when s...

Do you know how to use the flash wmode attribute in web pages?

When doing web development, you may encounter the...