linux安装Hadoop记录

  • Post author:
  • Post category:linux


1、下载地址




Index of apache-local/hadoop/common


icon-default.png?t=M7J4
https://repo.huaweicloud.com/apache/hadoop/common/



或者



Index of /dist/hadoop/common/hadoop-3.1.2/


icon-default.png?t=M7J4
https://archive.apache.org/dist/hadoop/common/hadoop-3.1.2/


2、上传到linux,并解压

tar -zxvf hadoop-3.1.2.tar.gz -C /opt/

3、更改文件名

mv /opt/hadoop-3.1.2 /opt/hadoop

4、执行以下命令,配置Hadoop环境变量 vim /etc/profile

echo ‘export HADOOP_HOME=/opt/hadoop/’ >> /etc/profile

echo ‘export PATH=$PATH:$HADOOP_HOME/bin’ >> /etc/profile

echo ‘export PATH=$PATH:$HADOOP_HOME/sbin’ >> /etc/profile

5、配置生效

source /etc/profile




6、执行以下命令,修改配置文件yarn-env.sh和hadoop-env.sh。

echo “export JAVA_HOME=/usr/local/java/jdk1.8.0_161” >> /opt/hadoop/etc/hadoop/yarn-env.sh

echo “export JAVA_HOME=/usr/local/java/jdk1.8.0_161” >> /opt/hadoop/etc/hadoop/hadoop-env.sh




7、查看版本是否安装成功

hadoop version






版权声明:本文为jquery_learn原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。