Big data actual combat Linux Ubuntu 20.04.1 server Hadoop environment to build preparatory work

outline
Insert picture description here

Build 4 Ubuntu systems,
3 server versions, and 1 desktop version. The server versions are master, slave1, and slave2 nodes. The desktop version of the virtual machine is a test machine.

1. Install the system and distribute the network

1.1 Click to jump to the server version to install the system, and to configure the network
1.2 Click to jump to the desktop version to install the system, and to configure the network

2. Connect Xshell

Failed to connect to Xshell click

2.1 Check the node machine

IP address, gateway, whether you can ping the external network, and whether you can ping the host's IP address.
If the ping fails, check the gateway and dns.

If the host IP address cannot be pinged, check the virtual network editor

2.2 Check the host

IP address, gateway, whether you can ping the external network, and whether you can ping the IP address of the virtual machine host

3. Modify the name of the virtual machine (take the master node as an example below)

3.1 Edit files

vi /etc/hostname
i Enter editing
Esc Exit
: wq Save and exit
Insert picture description here

4. Configure the hosts file

Purpose: do host mapping ip

4.1 Edit the hosts file

vi /etc/hosts
Insert picture description here

4.2 Restart the network

netplan apply

4.3 Check whether the modification is successful

ping master =ping 172.25.0.10
Insert picture description here

5. APT software source configuration

5.1 Enter the apt directory

cd / etc / apt
Insert picture description here

5.2 Before modifying the sources.list file, make a backup.

Insert picture description here

5.3 Edit the sources.list file

vi sources.list
Insert picture description here
Insert picture description here
here is a mirror file, generally there are 10 addresses. This article uses the mirror image of the 163 website. If you want to use the mirror address of other websites, modify the address. For example: using Aliyun website mirroring, change "163" in 10 URLs to "aliyun".

5.4 Update all software

apt update
Insert picture description here
Insert picture description here

5.5 View updated software

apt list --upgradable
Insert picture description here
Insert picture description here

6. Install openssh-server

Purpose: mster access to the slave node does not need to enter a password to enter the slave node.

6.1 Check whether openssh-server is installed

dpkg-query -l openssh-server The
Insert picture description here
figure above indicates that openssh-server has been installed.
The openssh-server is not installed as shown in the figure below.
Insert picture description here
version is none.

6.2 Install openssh-server

apt install openssh-server
Insert picture description here

6.3 Uninstall openssh-server

apt purge openssh-server -y
Insert picture description here
purge uninstalls more thoroughly, so use it.

7. Turn off the firewall

7.1 Check the status of the firewall

ufw status The
Insert picture description here
firewall in the figure above is closed. The
firewall in the figure below is turned on. ative
Insert picture description here

7.2 Start the firewall

ufw enable
Insert picture description here

7.3 Turn off the firewall

ufw disable
Insert picture description here

8. Modify the sshd_config file

Purpose: To connect to Xshell is to log in directly as the root user, without the need to log in as an ordinary user, and then switch the root user.

8.1 Enter the catalog

cd /etc/ssh
Insert picture description here

8.2 Modify files

vi sshd_config

Insert picture description here
Add PermitRootLogin yes to the line below PermitRootLogin prohibit-password
8.3 Restart the service
systemctl restart ssh

8.4 View ssh service status
systemctl status ssh
Insert picture description here

9. Host window system for host mapping

Path: C:\Windows\System32\drivers\etc
Insert picture description here
Edit the hosts file and add
172.25.0.10 master
172.25.0.11
slave1 172.25.0.12
slave2 172.25.0.20 bass-desktop at the end
Insert picture description here

10. Virtualization installation tool

Click here for details

11. Shut down and take a snapshot

Insert picture description here
The same is true for slave1, salve2, and bass-desktop, just install the above steps.

Guess you like

Origin blog.csdn.net/qq_45059457/article/details/108868592