Table of contents
Virtual machine installation CentOS7.4
1 Create a new virtual machine
2 Select the CentOS mirrorEdit
4 Virtual machine disk configurationEdit
5 Customize other configurations Edit
1 After the virtual machine configuration is complete, enter the system installation interfaceEdit
2 Select the installation language
Troubleshooting for not being able to access the Internet
virtual machine installation
- Virtual machine: VMware workstation 16
- Operating system: CentOS 7.4
Download address: https://vault.centos.org/centos/7.4.1708/isos/x86_64/CentOS-7-x86_64-Minimal-1708.iso
Virtual machine installation CentOS7.4
1 Create a new virtual machine
2 Select the CentOS image
3 storage locations
4 Virtual machine disk configuration
5 Customize other configurations
In the custom hardware, you can reconfigure the virtual machine's memory, cpu and other hardware attributes. The default single-core cpu and 1G memory are enough.
System installation
1 After the virtual machine configuration is complete, enter the system installation interface
After this interface appears, press "Enter" to enter the installation program
2 Select the installation language
Just choose Chinese
3 partition selection
By default, it will automatically format the disk for us, but you also need to click to confirm
4 Start the installation
We can set a password during the installation process
The installation is complete
When the "Restart" button appears, it means that the system has been installed
In the final appearance, enter the user name and password to log in. When entering the password, the switch of the numeric keypad will be turned off by default. Remember to turn it on
At this point, our basic installation of CentOS in VMware has been completed.
Linux configuration
Configure Internet access
- Modify the configuration network card configuration file
vi /etc/sysconfig/network-scripts/ifcfg-ens33
- Modify ONBOOT=yes
- restart network service
systemctl restart network
- Test ping qq.com
Successful, our virtual machine can access the Internet.
configure static ip
The previous network configuration is to use the dhcp method to assign ip addresses. This method will assign an ip to us every time the system is connected to the Internet. That is to say, the ip may change when the system starts next time, which is very inconvenient for us. manage. To configure static ip, you first need to open the network card configuration file
vi /etc/sysconfig/network-scripts/ifcfg-ens33
- Modify the startup protocol BOOTPROTO=static
-
Manually configure the ip address
IPADDR=192.168.137.135
NETMASK=255.255.255.0
GATEWAY=192.168.137.1
DNS1=8.8.8.8
- Next restart the network service
systemctl restart network
Troubleshooting for not being able to access the Internet
- Is the gateway in Vmware correct?
- Is it possible to directly ping the ip (physical connection check)
- Uninstall and reinstall