Home > Operation and Maintenance > Linux Operation and Maintenance > Detailed explanation of VM virtual machine environment preparation steps (pictures and text)

Detailed explanation of VM virtual machine environment preparation steps (pictures and text)

P粉469731340
Release: 2022-09-15 11:18:37
Original
2694 people have browsed it

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.

  1. Configure VM virtual machine network

  • Select Edit in the VM----Virtual Network Edit Device----Select VMnet8----There is change setting in the lower right corner, as shown below:

Detailed explanation of VM virtual machine environment preparation steps (pictures and text)

  • Enter change setting As shown below, you need to set the IP network segment and gateway

Detailed explanation of VM virtual machine environment preparation steps (pictures and text)

Detailed explanation of VM virtual machine environment preparation steps (pictures and text)

  • ## 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:

Detailed explanation of VM virtual machine environment preparation steps (pictures and text)

Detailed explanation of VM virtual machine environment preparation steps (pictures and text)

Detailed explanation of VM virtual machine environment preparation steps (pictures and text)# 3. Linux network configuration in VM

    Switch to root user
  • [zx@hadoop100 ~]$ su root

  • Enter: [root@hadoop100 zx]# vim / etc/sysconfig/network-scripts/ifcfg-ens33, enter the following editor:
Modify the above configuration, save and exit, as follows:

Detailed explanation of VM virtual machine environment preparation steps (pictures and text)

Detailed explanation of VM virtual machine environment preparation steps (pictures and text)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:

Detailed explanation of VM virtual machine environment preparation steps (pictures and text)

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

Detailed explanation of VM virtual machine environment preparation steps (pictures and text) 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

1Detailed explanation of VM virtual machine environment preparation steps (pictures and text)

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 1Detailed explanation of VM virtual machine environment preparation steps (pictures and text)

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
  • Start up and turn off the firewall: [root@hadoop100 zx]# systemctl disable firewalld.service

## 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 1Detailed explanation of VM virtual machine environment preparation steps (pictures and text)

  • First query the JDK through [zx@hadoop100 opt]$ rpm -qa | grep -i java, you can know There are jdk1.7 and jdk1.8 versions

1Detailed explanation of VM virtual machine environment preparation steps (pictures and text)

## 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!

Related labels:
vm
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template