本次测试环境如下
IP | host | JDK | linux | hadop | role |
172.16.101.55 | sht-sgmhadoopnn-01 | 1.8.0_111 | CentOS release 6.5 | hadoop-2.7.4 | namenode |
172.16.101.58 | sht-sgmhadoopdn-01 | 1.8.0_111 | CentOS release 6.5 | hadoop-2.7.4 | datanode |
172.16.101.59 | sht-sgmhadoopdn-02 | 1.8.0_111 | CentOS release 6.5 | hadoop-2.7.4 | datanode |
172.16.101.60 | sht-sgmhadoopdn-03 | 1.8.0_111 | CentOS release 6.5 | hadoop-2.7.4 | datanode |
1. 软件准备
http://www-eu.apache.org/dist/hadoop/common/hadoop-2.7.4/hadoop-2.7.4.tar.gz
http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz
2. 系统环境该准备
# useradd -r -u 115 -g dba -G root -d /home/hduser hduser # tar -zxf jdk-8u144-linux-x64.tar.gz -C /usr/java/ # tar -zxf hadoop-2.7.4.tar.gz -C /usr/local/ # chown -R hduser:dba /usr/local/hadoop-2.7.4/ # cat /home/hduser/.bash_profile .......... export JAVA_HOME=/usr/java/jdk1.8.0_111_273 export JRE_HOME=$JAVA_HOME/jre export HADOOP_HOME=/usr/local/hadoop-2.7.4 export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$JRE_HOME/lib export PATH=$JAVA_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$PATH:$HOME/bin
3. hadoop配置
4. 启动hadoop
5. 验证hadoop
时间: 2024-09-29 17:53:19