一、安装Hadoop
0、下载安装包
Wget http://mirror.bit.edu.cn/apache/hadoop/common/hadoop-2.6.0/hadoop-2.6.0.tar.gz
1、解压tar-xzvf hadoop-2.6.0.tar.gz
2、move到指定目录下:[spark@LOCALHOST]$mv hadoop-2.6.0 ~/opt/
3、进入hadoop目前 [spark@LOCALHOSTopt]$ cd hadoop-2.6.0/
[spark@LOCALHOST hadoop-2.6.0]$ ls
bin dfs etc include input lib libexec LICENSE.txt logs NOTICE.txt README.txt sbin share tmp
配置之前,先在本地文件系统创建以下文件夹:~/hadoop/tmp、~/dfs/data、~/dfs/name。主要涉及的配置文件有7个:都在/hadoop/etc/hadoop文件夹下,可以用gedit命令对其进行编辑。
~/hadoop/etc/hadoop/hadoop-env.sh
~/hadoop/etc/hadoop/yarn-env.sh
~/hadoop/etc/hadoop/slaves
~/hadoop/etc/hadoop/core-site.xml
~/hadoop/etc/hadoop/hdfs-site.xml
~/hadoop/etc/hadoop/mapred-site.xml
~/hadoop/etc/hadoop/yarn-site.xml
4、进入hadoop配置文件目录
[spark@LOCALHOST hadoop-2.6.0]$ cd etc/hadoop/
[spark@LOCALHOST hadoop]$ ls
capacity-scheduler.xml hadoop-env.sh httpfs-env.sh kms-env.sh mapred-env.sh ssl-cl