Hadoop集群搭建(3)
Hadoop安装
与zookeeper大体一致
-
上传压缩包到/export/software目录
-
cd /export/software
-
tar xzvf hadoop-3.1.1.tar.gz -C ../servers
#####2. 修改配置文件
配置文件的位置在 hadoop/etc/hadoop
######core-site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://bigdata1:8020</value>
</property>
<!-- 临时文件存储目录 -->
<property>
<name>hadoop.tmp.dir</name>
<value>/export/servers/hadoop-3.1.1/datas/tmp</value>
</property>
<!-- 缓冲区大小,实际工作中根据服务器性能动态调整 -->
<property>
<name>io.file.buffer.size</name>
<value>8192</value>
</property>
<!-- 开启hdfs的垃圾桶机制,删除掉的数据可以从垃圾桶中回收,单位分钟 -->
<property>
<name>fs.trash.interval</name>
<value>10080</value>
</property>
</configuration>
<configuration>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:///export/servers/hadoop-3.1.1/datas/namenode/namenodedatas</value>
</property>
<property>
<name>dfs.blocksize</name>
<value>134217728</value>
</property>
<property>
<name>dfs.namenode.handler.count</name>
<value>10</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:///export/servers/hadoop-3.1.1/datas/datanode/datanodeDatas</value>
</property>
<property>
<name>dfs.namenode.http-address</name>
<value>bigdata1:50070</value>
</property>
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
<property>
<name>dfs.permissions.enabled</name>
<value>false</value>
</property>
<property>
<name>dfs.namenode.checkpoint.edits.dir</name>
<value>file:///export/servers/hadoop-3.1.1/datas/dfs/nn/snn/edits</value>
</property>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>bigdata1.hadoop.com:50090</value