赞
踩
基本信息: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.defaultFS</name>
<value>hdfs://hybrid01:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/xxx/runtime/hadoop_repo</value>
</property>
</configuration>
<configuration>
<property>
<name>dfs.replication</name>
<value>2</value>
</property>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>hybrid01:50090</value>
</property>
</configuration>
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.env-whitelist</name>
<value>JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,CLASSPATH_PREPEND_DISTCACHE,HADOOP_YARN_HOME,HADOOP_MAPRED_HOME</value>
</property>
<property>
<name>yarn.resourcemanager.hostname</name>
<value>hybrid02</value>
</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
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <!-- jdbc 连接的 URL --> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://hybrid03:3306/hive?createDatabaseIfNotExist=true&amp;useSSL=false</value> </property> <!-- jdbc 连接的 Driver--> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>com.mysql.jdbc.Driver</value> </property> <!-- jdbc 连接的 username--> <property> <name>javax.jdo.option.ConnectionUserName</name> <value>root</value> </property> <!-- jdbc 连接的 password --> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>123456</value> </property> <!-- Hive 默认在 HDFS 的工作目录 --> <property> <name>hive.metastore.warehouse.dir</name> <value>/user/hive/warehouse</value> </property> <!-- 指定存储元数据要连接的地址 --> <property> <name>hive.metastore.uris</name> <value>thrift://hybrid03:9083</value> </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
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。