Install CentOS 7
Here we want to install the CentOS 7 64 bit, so choose the CentOS 7 64 bit configuration.
Set up an image for the newly created virtual machine
Here is the reason for setting up English, because English is a more international language. After setting up English, the system will have problems with English error prompts. It is easier to search for solutions through English error prompts on the Internet. It is more difficult to find solutions if mistakes are made in Chinese.
Set the time zone. The default is New York. It’s Shanghai, China.
Configure static IP
1. Change network configuration to NAT mode
Enter Vmnet8 directory of VMware Fusion through Mac terminal
cd /Library/Preferences/VMware\ Fusion/vmnet8
View nat.conf content
Keep in mind the data in the red box. The following configuration needs to be used
Check cat dhcpd.conf
Note that range is the range of static IP addresses allowed by the virtual machine. Customized static IP addresses must be within this range (this article intends to use 172.16.104.130 as an example).
Get DNS (Preference Settings in Mac System – > Network – >)
Log on to CentOS7
Enter the network-scripts directory of the virtual machine
Find the file at the beginning of ifcfg-en. In the figure above, my file is ifcfg-ens33.
Edit the file through VI
The following figure is the default configuration
We changed it to the following configuration
After saving, restart the service to make the changes take effect
service network restart
Take a look at Baidu and Ping successfully arrives at Baidu.
Then we can connect remotely through tools such as SecureCRT. One thing to remember is that if you go online in another place, you may find that your virtual machine is not working. That’s because the DNS address has changed. At this time, you just need to edit the ifcfg-enxxx file again, and then add the DNS address of your current network. that will do
Let’s test it through SecureCRT connection
The above is a tutorial illustration of MacVMware Fusion CentOS7 configuration static IP introduced by Editor Xiaobian. I hope it will be helpful to you. If you have any questions, please leave me a message and Editor will reply to you in time. Thank you very much for your support to developpaer.
If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!