标签:time manager mon moudle hdfs int http ash 临时
cat /etc/hosts
127.0.0.1 mo.don.com
useradd hadoop
passwd hadoop
visudo
hadoop ALL=(ALL) NOPASSWD: ALL
su - hadoop
wget http://mirror.bit.edu.cn/apache/hadoop/common/hadoop-3.1.2/hadoop-3.1.2.tar.gz
tar xf hadoop-3.1.2.tar.gz
mkdir moudles && mv hadoop-3.1.2 moudles
mkdir -p moudles/data/{datanode,namenode,tmp}
cd moudles/hadoop-3.1.2
cat /etc/profile
## add hadoop
export HADOOP_HOME=/home/hadoop/moudles/hadoop-3.1.2
export PATH=$HADOOP_HOME/bin/:$HADOOP_HOME/sbin:$PATH
cat /home/hadoop/moudles/hadoop-3.1.2/etc/hadoop/hadoop-env.sh
export JAVA_HOME=/usr/local/jdk1.8.0
cat /home/hadoop/moudles/hadoop-3.1.2/etc/hadoop/core-site.xml
<configuration>
<!-- HDFS资源路径 -->
<property>
<name>fs.defaultFS</name>
<value>hdfs://mo.do.com:9820</value>
</property>
<!-- 在见面界面访问数据使用的用户名 -->
<property>
<name>hadoop.http.staticuser.user</name>
<value>heron</value>
</property>
<!-- Hadoop临时文件存放目录 -->
<property>
<name>hadoop.tmp.dir</name>
<value>/home/hadoop/moudles/data/tmp</value>
</property>
<!-- 垃圾文件保留时间(秒) -->
<property>
<name>fs.trash.interval</name>
<value>7200</value>
</property>
</configuration>
cat /home/hadoop/moudles/hadoop-3.1.2/etc/hadoop/hdfs-site.xml
<configuration>
<!-- 是否进行权限检查 -->
<property>
<name>dfs.permissions.enabled</name>
<value>false</value>
</property>
<!-- 副本数 -->
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<!-- namenode元数据存储路径 -->
<property>
<name>dfs.namenode.name.dir</name>
<value>/home/hadoop/moudles/data/namenode</value>
</property>
<!-- 数据存储路径 -->
<property>
<name>dfs.datanode.data.dir</name>
<value>/home/hadoop/moudles/data/datanode</value>
</property>
</configuration>
cat /home/hadoop/moudles/hadoop-3.1.2/etc/hadoop/yarn-site.xml
<configuration>
<!-- resourceManager在哪台机器 -->
<property>
<name>yarn.resourcemanager.hostname</name>
<value>mo.do.com</value>
</property>
<!-- 在nodemanager中运行mapreduce服务 -->
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<!-- 配置日志的聚集功能 -->
<property>
<name>yarn.log-aggregation-enable</name>
<value>true</value>
</property>
<property>
<name>yarn.log-aggregation.retain-seconds</name>
<value>604800</value>
</property>
</configuration>
cat /home/hadoop/moudles/hadoop-3.1.2/etc/hadoop/mapred-site.xml
<configuration>
<!-- mapreduce运行在yarn上面 -->
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>yarn.app.mapreduce.am.env</name>
<value>HADOOP_MAPRED_HOME=/home/hadoop/moudles/hadoop-3.1.2</value>
</property>
<property>
<name>mapreduce.map.env</name>
<value>HADOOP_MAPRED_HOME=/home/hadoop/moudles/hadoop-3.1.2</value>
</property>
<property>
<name>mapreduce.reduce.env</name>
<value>HADOOP_MAPRED_HOME=/home/hadoop/moudles/hadoop-3.1.2</value>
</property>
</configuration>
hdfs namenode -format
hdfs --daemon start namenode
hdfs --daemon start datanode
yarn --daemon start resourcemanager
yarn --daemon start nodemanager
yarn --daemon start timelineserver
jps
[http://mo.don.com:9870]:
[http://mo.don.com:8088]:
标签:time manager mon moudle hdfs int http ash 临时
原文地址:https://www.cnblogs.com/boy215/p/11022611.html