1.创建hadoop目录
mkdir /usr/local/hadoop

2.切换到hadoop中
cd /usr/local/hadoop/

3.将hadoop直接拖到xShell中

4.解压hadoop
tar -zxvf hadoop-2.7.1.tar.gz

5.配置环境变量
vi /etc/profile
export PATH=$PATH:/usr/local/hadoop/hadoop-2.7.1/bin

6.加载配置文件(不能再xShell中)
source /etc/profile

7.为了保险起见 推荐在终端输入一次
export PATH=$PATH:/usr/local/hadoop/hadoop-2.7.1/bin

8.查看是否配置完成
hadoop version
如果出现版本则证明安装完成
