下载tar包
解压tar包
设置环境变量
export JAVA_HOME=/home/fantj/jdk
export PATH=$PATH:$JAVA_HOME/bin
export HADOOP_HOME=/home/fantj/hadoop
export PATH=$PATH:$HADOOP_HOME/bin:$PATH:$HADOOP_HOME/sbin
查看java版本
[root@localhost ~]# java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
查看hadoop版本
[root@localhost ~]# hadoop version
Hadoop 2.7.0
Subversion Unknown -r Unknown
Compiled by root on 2015-05-21T03:49Z
Compiled with protoc 2.5.0
From source with checksum a9e90912c37a35c3195d23951fd18f
This command was run using /home/fantj/download/hadoop-2.7.0/share/hadoop/common/hadoop-common-2.7.0.jar