一、基础环境的安装与配置
1.集群的规划:
主要包括NameNode、ResourceManager、NodeManager、SecondaryNameNode、DataNode这些角色与机器的划分,如下图
2.主机名修改
vim /etc/hostname
分别修改为:node1.itcast.cn、node2.itcast.cn、node3.itcast.cn
3.hosts映射
vim /etc/hosts
192.168.88.151 node1.itcast.cn node1
192.168.88.152 node2.itcast.cn node2
192.168.88.153 node3.itcast.cn node3
4.防火墙关闭
firewall-cmd --state #查看防火墙状态
systemctl stop firewalld.service #停止firewalld服务
systemctl disable firewalld.service #开机禁用firewalld服务
5.ssh免密登录:只需要在node1配置
#node1生成公钥私钥 (一路回车)
ssh-keygen
#node1配置免密登录到node1 node2 node3
ssh-copy-id node1
ssh-copy-id node2
ssh-copy-id node3
6.集群时间同步(三台机器一起)
yum -y install ntpdate
ntpdate ntp5.aliyun.com
7.创建统一工作目录
mkdir -p /export/server/ #软件安装路径
mkdir -p /export/data/ #数据存储路径
mkdir -p /export/software #安装包存放路径
8.安装JDK1.8(三台机器)
三台机器同时上传 jdk-8u241-linux-x64.tar.gz到/export/server/目录下