hadoop2.7.7 測試安裝 centos7
阿新 • • 發佈:2019-01-14
useradd –m hadoop –s /bin/bash
hadoop ALL=(ALL) ALL
su hadoop && cd ~ wget http://mirror.bit.edu.cn/apache/hadoop/common/hadoop-2.7.7/hadoop-2.7.7.tar.gz tar -zxf hadoop-2.7.7.tar.gz sudo mkdir /usr/local/hadoop sudo mv hadoop-2.7.7 /usr/local/hadoop mkdir dfs mkdir dfs/name mkdir dfs/data mkdir tmp cd /usr/local/hadoop/hadoop-2.7.7/etc/hadoop 涉及到的配置檔案有7個:
安裝路徑/hadoop-2.7.7/etc/hadoop/hadoop-env.sh
安裝路徑/hadoop-2.7.7/etc/hadoop/yarn-env.sh
安裝路徑/hadoop-2.7.7/etc/hadoop/slaves
安裝路徑/hadoop-2.7.7/etc/hadoop/core-site.xml
安裝路徑/hadoop-2.7.7/etc/hadoop/hdfs-site.xml
安裝路徑/hadoop-2.7.7/etc/hadoop/mapred-site.xml
安裝路徑/hadoop-2.7.7/etc/hadoop/yarn-site.xml
=== cat core-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:8020</value>
</property>
<property>
<name>io.file.buffer.size</name>
<value>131072</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>file:/home/hadoop/tmp</value>
<description>Abase for other temporary directories.</description>
</property>
<property>
<name>hadoop.proxyuser.hadoop.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.hadoop.groups</name>
<value>*</value>
</property>
</configuration> === cat hdfs-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>localhost:9001</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/hadoop/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/hadoop/dfs/data</value>
</property>
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
</configuration>
=== cp mapred-site.xml.template mapred-site.xml