hadoop-2.7.4编译安装
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hadoop-2.7.4编译安装相关的知识,希望对你有一定的参考价值。
1.protobuf编译安装
[[email protected] ~]# yum install svn autoconf automake libtool cmake ncurses-devel openssl-devel gcc* [[email protected] ~]# tar -zxf protobuf-2.5.0.tar.gz [[email protected] ~]# cd protobuf-2.5.0/ [[email protected] protobuf-2.5.0]# ./configure --prefix=/usr/local/protobuf2.5/ ... [[email protected] protobuf-2.5.0]# make && make install [[email protected] protobuf-2.5.0]# tail -2 /etc/profile #配置环境变量 export PROTOC_HOME=/usr/local/protobuf2.5/ export PATH=.$PATH:$PROTOC_HOME/bin [[email protected] protobuf-2.5.0]# protoc --version #验证 libprotoc 2.5.0
2.maven安装
[[email protected] ~]# yum install maven #使用yum安装maven会自动安装jdk和ant [[email protected] ~]# mvn -version Apache Maven 3.0.5 (Red Hat 3.0.5-17) Maven home: /usr/share/maven Java version: 1.8.0_141, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.10.0-514.el7.x86_64", arch: "amd64", family: "unix" [[email protected] ~]# java -version openjdk version "1.8.0_141" OpenJDK Runtime Environment (build 1.8.0_141-b16) OpenJDK 64-Bit Server VM (build 25.141-b16, mixed mode) [[email protected] ~]#
3.编译安装hadoop
[[email protected] ~]# tar -zxf hadoop-2.7.4-src.tar.gz [[email protected] ~]# cd hadoop-2.7.4-src/ [[email protected] hadoop-2.7.4-src]# mvn package -Pdist -DskipTests -Dtar #安装过程大约1小时 main: [exec] $ tar cf hadoop-2.7.4.tar hadoop-2.7.4 [exec] $ gzip -f hadoop-2.7.4.tar [exec] [exec] Hadoop dist tar available at: /root/hadoop-2.7.4-src/hadoop-dist/target/hadoop-2.7.4.tar.gz [exec] [INFO] Executed tasks [INFO] [INFO] --- maven-javadoc-plugin:2.8.1:jar (module-javadocs) @ hadoop-dist --- [INFO] Building jar: /root/hadoop-2.7.4-src/hadoop-dist/target/hadoop-dist-2.7.4-javadoc.jar [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Apache Hadoop Main ................................ SUCCESS [3:53.838s] [INFO] Apache Hadoop Build Tools ......................... SUCCESS [1:26.089s] ... ... [INFO] Apache Hadoop Tools ............................... SUCCESS [0.214s] [INFO] Apache Hadoop Distribution ........................ SUCCESS [1:49.587s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 49:23.379s [INFO] Finished at: Mon Aug 28 05:58:32 EDT 2017 [INFO] Final Memory: 91M/237M [INFO] ------------------------------------------------------------------------
#从提示信息中可以看到文件的存放目录为:
/root/hadoop-2.7.4-src/hadoop-dist/target/hadoop-2.7.4.tar.gz
本文出自 “lullaby” 博客,请务必保留此出处http://lullaby.blog.51cto.com/10815696/1960257
以上是关于hadoop-2.7.4编译安装的主要内容,如果未能解决你的问题,请参考以下文章
Hadoop 2.7.4 HDFS+YRAN HA删除datanode和nodemanager