This tutorial uses the CentOS7 version of Linux.
After the installation of the Linux system of the virtual machine is completed, configuring the VM virtual machine network requires configuring the VM virtual machine, the win10 operating system network and the Linux network in the VM.
Configure VM virtual machine network
![166270868959193Detailed explanation of VM virtual machine environment preparation steps (pictures and text) Detailed explanation of VM virtual machine environment preparation steps (pictures and text)](https://img.php.cn/upload/image/946/752/603/166270868959193Detailed%20explanation%20of%20VM%20virtual%20machine%20environment%20preparation%20steps%20(pictures%20and%20text))
![166270881257653Detailed explanation of VM virtual machine environment preparation steps (pictures and text) Detailed explanation of VM virtual machine environment preparation steps (pictures and text)](https://img.php.cn/upload/image/864/268/563/166270881257653Detailed%20explanation%20of%20VM%20virtual%20machine%20environment%20preparation%20steps%20(pictures%20and%20text))
![166270883145452Detailed explanation of VM virtual machine environment preparation steps (pictures and text) Detailed explanation of VM virtual machine environment preparation steps (pictures and text)](https://img.php.cn/upload/image/870/474/252/166270883145452Detailed%20explanation%20of%20VM%20virtual%20machine%20environment%20preparation%20steps%20(pictures%20and%20text))
- ## After the settings are completed, click OK, apply, etc.
2. VM network adapter network configuration in win10 system
- Find the network adapter VM8, right-click Properties, double-click IPV4 to enter the network settings interface:
![166270892270295Detailed explanation of VM virtual machine environment preparation steps (pictures and text) Detailed explanation of VM virtual machine environment preparation steps (pictures and text)](https://img.php.cn/upload/image/701/754/757/166270892270295Detailed%20explanation%20of%20VM%20virtual%20machine%20environment%20preparation%20steps%20(pictures%20and%20text))
![1662708939157530.png Detailed explanation of VM virtual machine environment preparation steps (pictures and text)](https://img.php.cn/upload/image/101/817/286/1662708939157530.png)
# 3. Linux network configuration in VM
Modify the above configuration, save and exit, as follows:
![166270905884073Detailed explanation of VM virtual machine environment preparation steps (pictures and text) Detailed explanation of VM virtual machine environment preparation steps (pictures and text)](https://img.php.cn/upload/image/432/436/475/166270905884073Detailed%20explanation%20of%20VM%20virtual%20machine%20environment%20preparation%20steps%20(pictures%20and%20text))
The above modified the value of BOOTPROTO to static;
Modified the value of ONBOOT to yes, which is used to activate the network card, otherwise the IP will not be displayed;
And add The following command:
![166270913023341Detailed explanation of VM virtual machine environment preparation steps (pictures and text) Detailed explanation of VM virtual machine environment preparation steps (pictures and text)](https://img.php.cn/upload/image/289/322/860/166270913023341Detailed%20explanation%20of%20VM%20virtual%20machine%20environment%20preparation%20steps%20(pictures%20and%20text))
The above 3 steps can complete the network configuration. Under normal circumstances, we need to configure the host name to facilitate subsequent development. The steps are as follows:
4. Configure the host name
Enter the command: [root@hadoop100 zx]# vim /etc/hostname You can modify the host name
5. Host IP mapping
We will build a cluster later. In order to facilitate the later modification of IP, we need to do host mapping for the current template server
Enter the command: [root@hadoop100 zx]# vim /etc/hosts, enter the editor, add the host in the editor ## 7. Network test
![166270929048440Detailed explanation of VM virtual machine environment preparation steps (pictures and text) 1Detailed explanation of VM virtual machine environment preparation steps (pictures and text)](https://img.php.cn/upload/image/529/784/149/166270929048440Detailed%20explanation%20of%20VM%20virtual%20machine%20environment%20preparation%20steps%20(pictures%20and%20text))
Use the command to reboot: reboot
-
Test: ping www.baidu.com, the following information appears to indicate successful network configuration:
8. Install epel-release software ![166270932632934Detailed explanation of VM virtual machine environment preparation steps (pictures and text) 1Detailed explanation of VM virtual machine environment preparation steps (pictures and text)](https://img.php.cn/upload/image/589/288/185/166270932632934Detailed%20explanation%20of%20VM%20virtual%20machine%20environment%20preparation%20steps%20(pictures%20and%20text))
Extra Packages for Enterprise Linux provide additional software for "Red Hat" operating systems Package, available for RHEL, CentOS and Scientific Linux. It is equivalent to a software warehouse, and most rpm packages cannot be found in the official repository.
-
Installation command: [root@hadoop100 zx]# yum install -y epel-release
Tips: If Linux is installed It is the minimum system version, and you also need to install the following tools; if you are installing the Linux desktop standard version, you need to perform the following operations:
(1) Install the net-tool tool package collection, including ifconfig and other commands
Installation command: [root@hadoop100 zx]# yum install -y net-tools
(2) Install vim editor installation command: [root@hadoop100 zx]# yum install -y vim
9. Turn off the firewall
Single turn off the firewall command: [root@hadoop100 zx]# systemctl stop firewalld
## 10. Create zx user
- [root@hadoop100 zx]# useradd zx #Username
- [root@hadoop100 zx]# passwd 000000 #Password
11. Add permissions to the zx user to facilitate later use of the zx user plus sudo to use root permissions
- Command: [root@hadoop100 zx]# vim /etc/sudoers Enter the editor
- Insert the command zx ALL=(ALL) NOPASSWD:ALL in the next line of %wheel ALL=(ALL) ALL
- :wq! force Save, because this is a read-only file
- Test: Enter the opt directory and delete the rh file in the directory. If you use the command rm -rf rh/, you will be prompted for insufficient permissions; If you use sudo rm -rf rh/ it will be fine.
12. Directory preparation and permission operation. Enter the opt directory and create the module and software directories in the opt directory. All future software will be installed in this directory.
13. Uninstall the original JDK ![166270959098796Detailed explanation of VM virtual machine environment preparation steps (pictures and text) 1Detailed explanation of VM virtual machine environment preparation steps (pictures and text)](https://img.php.cn/upload/image/715/763/677/166270959098796Detailed%20explanation%20of%20VM%20virtual%20machine%20environment%20preparation%20steps%20(pictures%20and%20text))
- First query the JDK through [zx@hadoop100 opt]$ rpm -qa | grep -i java, you can know There are jdk1.7 and jdk1.8 versions
![166270962622184Detailed explanation of VM virtual machine environment preparation steps (pictures and text) 1Detailed explanation of VM virtual machine environment preparation steps (pictures and text)](https://img.php.cn/upload/image/719/819/905/166270962622184Detailed%20explanation%20of%20VM%20virtual%20machine%20environment%20preparation%20steps%20(pictures%20and%20text))
## Description:
rpm -qa: Query all installed rpm packages grep -i: Ignore case xargs -n1: Indicates each time Pass only one parameter rpm -e –nodeps: force uninstall the software 14. Restart the virtual machine
[root @hadoop100 opt]# reboot
The above is the detailed content of Detailed explanation of VM virtual machine environment preparation steps (pictures and text). For more information, please follow other related articles on the PHP Chinese website!