千家信息网

Hadoop的安装过程详解

发表于:2025-02-03 作者:千家信息网编辑
千家信息网最后更新 2025年02月03日,本篇内容主要讲解"Hadoop的安装过程详解",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"Hadoop的安装过程详解"吧!安装JDK解压jdk压缩包 ta
千家信息网最后更新 2025年02月03日Hadoop的安装过程详解

本篇内容主要讲解"Hadoop的安装过程详解",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"Hadoop的安装过程详解"吧!

安装JDK

  • 解压jdk压缩包

 tar -zxvf /home/hadoop/software/jdk-7u80-linux-x64.tar.gz -C /usr/java/                 1                       2       
  • 配置jdk环境变量

hadoop:root:/usr/java:>vi /etc/profile # /etc/profile # System wide environment and startup programs, for login setup # Functions and aliases go in /etc/bashrc # It's NOT a good idea to change this file unless you know what you # are doing. It's much better to create a custom.sh shell script in # /etc/profile.d/ to make custom changes to your environment, as this # will prevent the need for merging in future updates. #add path export JAVA_HOME=/usr/java/jdk1.7.0_80 export PATH=$JAVA_HOME/bin:$PATH #show path hadoop:root:/usr/java:>source /etc/profilehadoop:root:/usr/java:>java -versionjava version "1.7.0_80" Java(TM) SE Runtime Environment (build 1.7.0_80-b15)Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)                1                       2                       3                       4                       5                       6                       7                       8                       9                       10                      11                      12                      13                      14                      15                      16                      17                      18                      19                      20                      21                      22                      23                      24                      25                      26      

安装Hadoop

  • 解压Hadoop
    hadoop:hadoop:/home/hadoop/app:>tar -zxvf /home/hadoop/software/hadoop-2.6.0-cdh6.7.0.tar.gz -C /home/hadoop/app/

  • 配置环境

hadoop:hadoop:/home/hadoop:>vi .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs export HADOOP_HOME=/home/hadoop/app/hadoop-2.6.0-cdh6.7.0 export PATH=$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$PATH hadoop:hadoop:/home/hadoop:>source .bash_profile hadoop:hadoop:/home/hadoop:>echo $HADOOP_HOME /home/hadoop/app/hadoop-2.6.0-cdh6.7.0                 1                       2                       3                       4                       5                       6                       7                       8                       9                       10                      11                      12                      13                      14                      15                      16                      17                      18                      19      

格式化Hadoop

 hdfs namenode -format                 1                       2       

启动Hadoop

hadoop:hadoop:/home/hadoop/app/hadoop-2.6.0-cdh6.7.0/etc/hadoop:>start-all.sh This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh 18/01/02 02:49:33 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicableStarting namenodes on [hadoop]hadoop: starting namenode, logging to /home/hadoop/app/hadoop-2.6.0-cdh6.7.0/logs/hadoop-hadoop-namenode-hadoop.out hadoop: starting datanode, logging to /home/hadoop/app/hadoop-2.6.0-cdh6.7.0/logs/hadoop-hadoop-datanode-hadoop.out Starting secondary namenodes [0.0.0.0] 0.0.0.0: starting secondarynamenode, logging to /home/hadoop/app/hadoop-2.6.0-cdh6.7.0/logs/hadoop-hadoop-secondarynamenode-hadoop.out 18/01/02 02:50:15 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicablestarting yarn daemonsstarting resourcemanager, logging to /home/hadoop/app/hadoop-2.6.0-cdh6.7.0/logs/yarn-hadoop-resourcemanager-hadoop.out hadoop: starting nodemanager, logging to /home/hadoop/app/hadoop-2.6.0-cdh6.7.0/logs/yarn-hadoop-nodemanager-hadoop.out hadoop:hadoop:/home/hadoop/app/hadoop-2.6.0-cdh6.7.0/etc/hadoop:>jps 8345 NodeManager 8066 SecondaryNameNode 7820 NameNode 7914 DataNode 8249 ResourceManager 8613 Jps

到此,相信大家对"Hadoop的安装过程详解"有了更深的了解,不妨来实际操作一番吧!这里是网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

0