基本信息:Centos-7.9、Java-1.8、Python-3.9、Scala-2.12、Hadoop-3.2.1、Spark-3.1.2、Flink-1.13.1、Hive-3.1.3、Zookeeper-3.8.0、Kafka-3.2.0、Nginx-1.23.1
所有安装配置都基于个人学习配置,生产环境安装请明确各项配置
BOOTPROTO="static"
ONBOOT="yes"
GATEWAY="10.211.55.1"
IPADDR="10.211.55.101"
NETMASK="255.255.255.0"
DNS1="114.114.114.114"
DNS2="8.8.8.8"
export JAVA_HOME=/xx/xx
export PATH=$JAVA_HOME/bin:$PATH
export SCALA_HOME=/xx/xx
export PATH=$SCALA_HOME/bin:$PATH
<configuration>
<property>
<name>fs.defaultFSname>
<value>hdfs://hybrid01:9000value>
property>
<property>
<name>hadoop.tmp.dirname>
<value>/xxx/runtime/hadoop_repovalue>
property>
configuration>
<configuration>
<property>
<name>dfs.replicationname>
<value>2value>
property>
<property>
<name>dfs.namenode.secondary.http-addressname>
<value>hybrid01:50090value>
property>
configuration>
<configuration>
<property>
<name>mapreduce.framework.namename>
<value>yarnvalue>
property>
configuration>
<configuration>
<property>
<name>yarn.nodemanager.aux-servicesname>
<value>mapreduce_shufflevalue>
property>
<property>
<name>yarn.nodemanager.env-whitelistname>
<value>JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,CLASSPATH_PREPEND_DISTCACHE,HADOOP_YARN_HOME,HADOOP_MAPRED_HOMEvalue>
property>
<property>
<name>yarn.resourcemanager.hostnamename>
<value>hybrid02value>
property>
configuration>
HDFS_DATANODE_USER=root
HDFS_DATANODE_SECURE_USER=hdfs
HDFS_NAMENODE_USER=root
HDFS_SECONDARYNAMENODE_USER=root
YARN_RESOURCEMANAGER_USER=root
HADOOP_SECURE_DN_USER=yarn
YARN_NODEMANAGER_USER=root
HADOOP_HOME=/xxx/hadoop-3.2.1
export PATH=$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$PATH
export HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop
export HADOOP_CLASSPATH=`hadoop classpath`
其他组件会用到 MySQL 进行配置,这里先安装 MySQL,主要使用的是 Docker 来安装,懒得去弄安装包安装了
这里我没有直接安装 Spark 集群,一般都是提交到 Hadoop Yarn 中进行执行,这里只是解压配置环境变量即可
SPARK_HOME=/xxx/xx
export PATH=$SPARK_HOME/bin:$PATH
FLINK_HOME=/xxx/xx
export PATH=$FLINK_HOME/bin:$PATH
<configuration>
<property>
<name>javax.jdo.option.ConnectionURLname>
<value>jdbc:mysql://hybrid03:3306/hive?createDatabaseIfNotExist=true&useSSL=falsevalue>
property>
<property>
<name>javax.jdo.option.ConnectionDriverNamename>
<value>com.mysql.jdbc.Drivervalue>
property>
<property>
<name>javax.jdo.option.ConnectionUserNamename>
<value>rootvalue>
property>
<property>
<name>javax.jdo.option.ConnectionPasswordname>
<value>123456value>
property>
<property>
<name>hive.metastore.warehouse.dirname>
<value>/user/hive/warehousevalue>
property>
<property>
<name>hive.metastore.urisname>
<value>thrift://hybrid03:9083value>
property>
configuration>
HIVE_HOME=/xxx/xx
export PATH=$HIVE_HOME/bin:$PATH
后面操作都类似,就不细写了
dataDir=/acware/data/zookeeper
dataLogDir=/acware/logs/zookeeper
server.1=hybrid01:2888:3888
server.2=hybrid02:2888:3888
server.3=hybrid03:2888:3888
#broker的全局唯一编号,不能重复
broker.id=0
#kafka运行日志存放的路径
log.dirs=log.dirs=/acware/logs/kafka
#配置连接Zookeeper集群地址
zookeeper.connect=hybrido1:2181,hybrid02:2181,hybrid03:2181