Ubuntu 14.04.4 下 Hadoop环境搭建安装
一,准备环境:
1,64位ubuntu-14.04.4
2,jdk-7u80-linux-x64
二,配置jdk:
1,输入命令语句:
2,写入配置信息:

3,使配置信息起作用:

4,jdk搭建成功:

三,hadoop的配置:
1,解压hadoop:
hadoop@master:/mysoftware$ tar -zxvf hadoop-2.6.4.tar.gz
2,修改hadoop-env.sh


3,修改core-site.xml:

<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://master:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>file:/mysoftware/hadoop-2.6.4/tmp</value>
</property>
<property>
<name>hadoop.native.lib</name>
<value>false</value>
</property>
</configuration>
4.修改hdfs-site.xml:

<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/mysoftware/hadoop-2.6.4/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/mysoftware/hadoop-2.6.4/dfs/data</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
</configuration>
5,修改mapred-site.xml:

<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
6,修改yarn-site.xml:

<configuration>
<property>
<description>The hostname of the RM.</description>
<name>yarn.resourcemanager.hostname</name>
<value>master</value>
</property>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce.shuffle</value>
</property>
</configuration>
7,创建文件夹:

8,修改权限:
9,修改hostsname:

10,修改主机信息:
用#号注释以前的主机名,配上虚拟机的IP及名字:

11,格式化hadoop:
hadoop@master:/mysoftware/hadoop-2.6.4$ bin/hdfs namenode -format
显示下面的信息,则成功:

12,启动hadoop:
hadoop@master:/mysoftware/hadoop-2.6.4$ sbin/start-dfs.sh
输入:hadoop@master:/mysoftware/hadoop-2.6.4$ jps

看到这5个进程就表示成功。
对了这里装的是伪分布式的。
下面关于Hadoop的文章您也可能喜欢,不妨看看:
Ubuntu14.04下Hadoop2.4.1单机/伪分布式安装配置教程