赞
踩
https://blog.csdn.net/qq_38617531/article/details/86675403
目录
3 Spark安装(未部署测试)
apache-zookeeper-3.6.3-bin.tar.gz
flink-1.7.2-bin-hadoop28-scala_2.12.tgz
hadoop-2.8.5.tar.gz
hbase-2.3.5-bin.tar.gz
kafka_2.12-2.6.2.tgz
4台机器(CentOS8),1个master,3个slave
修改主机名
- hostnamectl set-hostname master
- reboot
其他3台机器依次将设置为slave1,slave2,slave3。
修改IP地址
vi /etc/sysconfig/network-scripts/ifcfg-ens33 TYPE="Ethernet" PROXY_METHOD="none" BROWSER_ONLY="no" BOOTPROTO="static" DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" IPV6_ADDR_GEN_MODE="stable-privacy" NAME="ens33" UUID="c35b7341-8921-48f5-ad7a-08cb5af4ba54" DEVICE="ens33" ONBOOT="yes" IPADDR=192.168.2.10 NETMASK=255.255.255.0 GATEWAY=192.168.2.1 DNS1=114.114.114.114 DNS2=8.8.8.8 service network restart
其他3台机器依次将设置为2.11,2.12,2.13。
关闭防火墙
- systemctl stop firewalld
- systemctl disable firewalld
ssh通信
- // 生成密钥
- ssh-keygen -t rsa
- // 将公钥追加到验证表中
- cat id_rsa.pub >> ~/.ssh/authorized_keys
- // 将公钥追加到其他主机验证表中
- ssh-copy-id -i ~/.ssh/id_rsa.pub root@slave1
- ssh-copy-id -i ~/.ssh/id_rsa.pub root@slave2
- ssh-copy-id -i ~/.ssh/id_rsa.pub root@slave3
配置hosts,以便DNS解析主机名
- vim /etc/hosts
-
- 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
- ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
- 192.168.2.10 master
- 192.168.2.11 slave1
- 192.168.2.12 slave2
- 192.168.2.13 slave3
-
- 拷贝给其他主机:
- scp /etc/hosts root@slave1:/etc/
1.2.1 安装包拷贝、解压
将压缩包拷贝至Linux系统中,移动到/usr/software/java目录下,并解压:
- mv jdk-8u202-linux-x64.tar.gz /usr/software/java
- tar -zxvf jdk-8u202-linux-x64.tar.gz
1.2.2 设置环境变量
- vi /etc/profile
-
- export JAVA_HOME=/usr/software/jdk
- export JRE_HOME=$JAVA_HOME/jre
- export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
- export CLASS_PATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
Esc[:wq]保存后,执行以下命令让其当即生效:
source /etc/profile
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。