.Hive全部版本下载地址:
***/dist/hive/
.HADOOP全部版本下载地址:
***/dist/hadoop/common/
.zookeeper全部版本地址下载
***/dist/zookeeper/
1.hadoop安装
安装前注意:
hostname
hadoop
Hadoop 3.1.3
hadoop1
hadoop2
hadoop3
安装java环境
ip:148
ip:149
ip:150
java
jdk-11.0.15_linux-x64_bin.tar.gz
### 1.1.下载hadoop3.1.3版本和jdk
wget ***/dist/hadoop/common/hadoop-3.1.3/hadoop-3.1.3.tar.gzwget ***/java/jdk/8u181-b13/jdk-8u181-linux-x64.tar.gz
1.2.配置环境变量export JAVA_HOME=/usr/local/jdkexport JRE_HOME=${JAVA_HOME}/jreexport CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/libexport PATH=${JAVA_HOME}/bin:$PATHexport HADOOP_HOME=/usr/local/hadoopexport PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbinexport HDFS_NAMENODE_USER=rootexport HDFS_DATANODE_USER=rootexport HDFS_SECONDARYNAMENODE_USER=rootexport YARN_RESOURCEMANAGER_USER=rootexport YARN_NODEMANAGER_USER=root
【在hadoop集群下启动zookeeper】2.配置文件2.1. core.site.xml
<configuration> <property> <name>fs.defaultFS</name> <value>hdfs://hadoop1:9000</value> </property> <property> <name>hadoop.tmp.dir</name> <value>/usr/local/hadoop/tmp</value> </property> <property> <name>dfs.webhdfs.enabled</name> <value>true</value> </property></configuration>
2.2. mapred-site.xml<configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property></configuration>
2.3. yarn-site.xml<configuration><!-- Site specific YARN configuration properties --> <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property> <property> <name>yarn.resourcemanager.hostname</name> <value>hadoop1</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.webapp.ui2.enable</name> <value>true</value> </property> <property> <name>yarn.nodemanager.vmem-check-enabled</name> <value>false</value> </property></configuration>
2.4. hdfs-site.xml<configuration> <property> <name>dfs.namenode.name.dir</name> <value>/usr/local/hadoop/hdfs/name</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>/usr/local/hadoop/hdfs/data</value> </property> <property> <name>dfs.replication</name> <value>3</value> </property> <property> <name>dfs.permissions</name> <value>false</value> </property></configuration>
2.5.hadoop-env.shexport JAVA_HOME=/usr/local/jdk2.6. workers
hadoop12.7.格式化
hadoop2
hadoop3
hadoop namenode -format
2.8 启动start-all.sh提示:记住分发配置文件
zookeeper配置
版本:zookeeper-3.4.10.tar.gz
上传软件包解压到指定目录:tar -xvf zookeeper-3.4.10.tar.gz -C /usr/local创建zk的存储目录:mkdir /usr/local/zookeeper-3.4.10/zkData创建myid:cd 到zkData目录下 echo 1 >myid myid三台的id要改hadoop1:myid 1hadoop2:myid 2hadoop3:myid 3
修改配置文件
cd /usr/local/zookeeper-3.4.10/confcp zoo_sample.cfg zoo.cfg vim zoo.cfg dataDir=/usr/local/zookeeper-3.4.10/zkData server.1=hadoop1:2888:3888 server.2=hadoop2:2888:3888 server.3=hadoop3:2888:3888
配置环境变量
vim /etc/profileexport ZOOKEEPER_HOME=/usr/local/zookeeper-3.4.10export PATH=$PATH:$ZOOKEEPER_HOME/binsource /etc/profile
分发文件
scp -r /usr/local/zookeeper-3.4.10 centos02:/usr/localscp -r /usr/local/zookeeper-3.4.10 centos03:/usr/localscp -r /etc/profile hadoop2:/etcscp -r /etc/profile hadoop3:/etcsource /etc/profile 生效
启动
hadoop1:zkServer.sh starthadoop2:zkServer.sh starthadoop3:zkServer.sh startzkServer.sh status 查看状态显示:Mode: leader Mode: followerMode: follower 高可用安装完成
推荐阅读
- 24年面膜哪个牌子好?实在好用不贵的面膜排行榜前十名
- 葫芦挂在家里哪里聚财 葫芦挂在家里哪里招财
- 空调制热8000W功率是多少
- 女人坐在飞机上飞是什么意思 女人坐在飞机上飞什么
- 正在热播的五部电视剧,《追风者》排在倒数,你在追哪一部?
- 我的世界在生存里怎么快速致富
- cdr怎么在固定区域排版,cdr要怎么样才可以进行排版
- 沙尘暴来了怎么办 沙尘暴来了怎么办在沙漠中
- 钉钉直播美颜在哪
- 什么面料的t恤衫最好 针织T恤衫定制在面料上有什么特点