基于mac的伪分布安装
hadoop版本 3.3.4
1.修改配置文件
ssh localhost
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://bigdata101:8020</value>
</property>
<!--修改文件路径 -->
<property>
<name>hadoop.tmp.dir</name>
<value>/opt/soft/hadoop/data</value>
</property>
<property>
<!--web 页面 操作用户 -->
<name>hadoop.http.staticuser.user</name>
<value>root</value>
</property>
<!--历史服务 -->
<property>
<name>mapreduce.jobhistory.address</name>
<value>localhost:10020</value>
</property>
<property>
<name>mapreduce.jobhistory.webapp.address</name>
<value>localhost:19888</value>
</property>
</configuration>
<configuration>
<property>
<!--设置副本 -->
<name>dfs.replication</name>
<value>1</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_HOME,PATH,LANG,TZ,HADOOP_MAPRED_HOME</value>
</property>
</configuration>
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>mapreduce.application.classpath</name>
<value>$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/*:$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/lib/*</value>
</property>
</configuration>
2.namenode初始化
bin/hdfs namenode -format
3.启动集群
sbin/start-all.sh
4.启动历史服务器
bin/mapred --daemon start historyserver
5.hadoop UI
http://localhost:9870/
6.yarn UI
http://localhost:8088/
7.history UI
http://localhost:19888/