本文使用虚拟机进行集群的搭建
搭建前准备
需要下载 MobaXterm(SSH工具)、Ubuntu Server镜像、VMware Workstation,如下图所示

下载链接如下:
# MobaXterm 21.4
https://download.mobatek.net/2142021091974654/MobaXterm_Installer_v21.4.zip
# Ubuntu Server 21.10
https://mirrors.neusoft.edu.cn/ubuntu-releases/21.10/ubuntu-21.10-live-server-amd64.iso
# VMware Workstation 16.2.0
https://download3.vmware.com/software/wkst/file/VMware-workstation-full-16.2.0-18760230.exe
安装好 MobaXterm 和 VMware Workstation
虚拟机创建
Step 1:打开 VMware Workstation ,选择创建新的虚拟机

Step 2:选择 自定义(高级) 并点击下一步

Step 3:使用默认配置,点击下一步

Step 4:点击安装程序光盘镜像文件,点击浏览选择之前下载的 Ubuntu Server 21.10 镜像文件,并点击下一步

Step 5:修改下虚拟机名称(可选步骤),并点击下一步

Step 6:修改下处理器数量和每个处理器的内核数量(需要根据电脑的性能而定,这里都设置为2),并点击下一步

Step 7:设置虚拟机的内存大小(需要根据电脑的内存大小而定,这里设置为6144),并点击下一步

Step 8:选择使用桥接网络,并点击下一步

Step 9:使用默认配置,点击下一步

Step 10:使用默认配置,点击下一步

Step 11:使用默认配置,点击下一步

Step 12:修改最大磁盘大小(需要根据电脑磁盘大小而定,这里设置为50),并点击下一步

Step 13:使用默认配置,并点击下一步

Step 14:使用默认配置,并点击完成,等待一会儿进入Ubuntu Server安装界面

服务器安装
注意:后续步骤只能键盘操作,上下方向键或Tab键选择,回车键确认
Step 15:按下回车键

Step 16:语系选择,这里使用默认配置,按下回车键

Step 17:键盘选择,这里使用默认配置,选择Done并回车

Step 18:服务器类型选择,这里使用默认配置,选择Done并回车

Step 19:IP配置(请记住这个IP,后面SSH登录时要用),这里使用默认配置,选择Done并回车

Step 20:代理配置,这里使用默认配置,选择Done并回车

Step 21:镜像配置,这里使用默认配置,选择Done并回车

Step 22:存储选择,这里使用默认配置,选择Done并回车

Step 23:存储配置,这里使用默认配置,选择Done并回车

Step 24:存储确认,选择Continue并回车

Step 25:账户配置(请记住这里的配置,后面SSH登录的时候需要用),配置好后选择Done并回车

Step 26:SSH配置,选择安装OpenSSH Server,之后选择Done并回车

Step 27:其他服务安装,这里不安装,选择Done并回车

Step 28:开始安装

Step 29:安装完成,选择Reboot Now

Step 30:按下回车键移除安装介质

Step 31:登录界面

Step 32:登录成功,安装完成

之后可以使用MobaXterm进行远程登录
虚拟机克隆
Hadoop集群搭建至少需要三个节点,关闭刚才创建的虚拟机,完整克隆出三个节点,分别取名去node1、node2、node3
Step 33:关闭已经启动的服务器

Step 34:右击Ubuntu -> 管理 -> 克隆

Step 35:点击下一步

Step 36:使用默认配置,点击下一步

Step 37:选择创建完整克隆,点击下一步

Step 38:输入虚拟机名称node1,点击下一步

Step 39:点击关闭完成创建

Step 40:重复创建步骤,创建出node2和node3

|