官网

http://hadoop.apache.org/
下载页:https://hadoop.apache.org/releases.html

上传安装包到Linux

解压并进入到目录下

[root@hadoop101 software]# tar -zxf hadoop-2.7.2.tar.gz -C /opt/module/
[root@hadoop101 software]# ls /opt/module/
hadoop-2.7.2  
[root@hadoop101 software]# ls /opt/module/
hadoop-2.7.2  
$ cd /opt/module/hadoop-2.7.7/

配置JAVA_HOME 位置

在/opt/module/hadoop-2.7.2/etc/hadoop路径下配置hadoop-env.sh

	(1)Linux系统中获取jdk的安装路径:
		[root@hadoop101 jdk1.8.0_144]# echo $JAVA_HOME
		/opt/module/jdk1.8.0_144

	(2)修改hadoop-env.sh文件中JAVA_HOME 路径:
		[root@hadoop101 hadoop]# vi hadoop-env.sh
    	修改JAVA_HOME如下
		export JAVA_HOME=/opt/module/jdk1.8.0_144

将hadoop添加到环境变量

	(1)获取hadoop安装路径:
			[root@ hadoop101 hadoop-2.7.2]# pwd
			/opt/module/hadoop-2.7.2

	
	(2)打开/etc/profile文件:
			[root@ hadoop101 hadoop-2.7.2]# vi /etc/profile
					在profie文件末尾添加jdk路径:(shitf+g)
			
			##HADOOP_HOME
			export HADOOP_HOME=/opt/module/hadoop-2.7.2
			export PATH=$PATH:$HADOOP_HOME/bin
			export PATH=$PATH:$HADOOP_HOME/sbin			
	
	(4)让修改后的文件生效:.
		[root@ hadoop101 hadoop-2.7.2]# source /etc/profile
	(5)测试是否安装成功
	[root@ hadoop101 hadoop-2.7.2]$ hadoop version
		Hadoop 2.7.2