博客园 首页 私信博主 显示目录 隐藏目录 管理 动画

hadoop集群搭建

[root@hadoop106 ~]# vim /etc/hostname
hadoop106

vim /etc/sysconfig/network

hostname=hadoop106
vim /etc/hosts

47.100.210.196 hadoop106
139.196.139.79 hadoop107
139.196.72.78 hadoop108


vim /etc/sysconfig/network-scripts/ifcfg-eth0
yum install lrzsz -y
yum install unzip zip -y

vim /etc/profile.d/my_env.sh

#JAVA_HOME
export JAVA_HOME=/opt/module/jdk
#export JAVA_VERSION=18
export PATH=$PATH:$JAVA_HOME/bin
#HADOOP_HOME
export HADOOP_HOME=/opt/module/hadoop
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
export HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop
#HBASE_HOME
export HBASE_HOME=/opt/module/hbase
export PATH=$PATH:$HBASE_HOME/bin
#KAFKA_HOME
export KAFKA_HOME=/opt/module/kafka
export PATH=$PATH:$KAFKA_HOME/bin
#Flink Env
export FLINK_HOME=/opt/module/flink
export PATH=$PATH:$FLINK_HOME/bin
#phoenix
export PHOENIX_HOME=/opt/module/phoenix
export PHOENIX_CLASSPATH=$PHOENIX_HOME
export PATH=$PATH:$PHOENIX_HOME/bin
#HIVE
export HIVE_HOME=/opt/module/hive
export HIVE_CONF_DIR=${HIVE_HOME}/conf
export PATH=$PATH:$HIVE_HOME/bin
#tez
export TEZ_HOME=/opt/module/tez
export PATH=$PATH:$TEZ_HOME/bin
#Spark
export SPARK_HOME=/opt/module/spark-yarn
export PATH=$PATH:$SPARK_HOME/bin
#Class Path
export CLASSPATH=.:${JAVA_HOME}/lib::${HIVE_HOME}/lib:$CLASSPATH
#hive_dependency
#export hive_dependency=/opt/module/hive/conf:/opt/module/hive/lib/*:/opt/module/hive/hcatalog/share/hcatalog/hive-hcatalog-core-2.0.0.jar

source /etc/profile.d/my_env.sh

reboot

[root@hadoop102 ~]# zip -r shells.zip shells/
[root@hadoop102 ~]# sz shells.zip

[root@hadoop106 ~]# rz -E
[root@hadoop106 ~]# unzip shells.zip

cd /root/.ssh;
ssh-keygen -t rsa;
ssh-copy-id hadoop106;
ssh-copy-id hadoop107;
ssh-copy-id hadoop108;

cd /root/shells;
cp xsync.sh /root/bin;
cd/root/bin;
cp xsync.sh xsync;
xsync xsync;

posted @ 2022-06-14 09:13  CHANG_09  阅读(28)  评论(0编辑  收藏  举报