共计 3228 个字符,预计需要花费 9 分钟才能阅读完成。
1.protobuf 编译安装
[root@Hadoop1 ~]# yum install svn autoconf automake libtool cmake ncurses-devel openssl-devel gcc*
[root@hadoop1 ~]# tar -zxf protobuf-2.5.0.tar.gz
[root@hadoop1 ~]# cd protobuf-2.5.0/
[root@hadoop1 protobuf-2.5.0]# ./configure –prefix=/usr/local/protobuf2.5/
…
[root@hadoop1 protobuf-2.5.0]# make && make install
[root@hadoop1 protobuf-2.5.0]# tail -2 /etc/profile #配置环境变量
export PROTOC_HOME=/usr/local/protobuf2.5/
export PATH=.$PATH:$PROTOC_HOME/bin
[root@hadoop1 protobuf-2.5.0]# protoc –version #验证
libprotoc 2.5.0
2.maven 安装
[root@hadoop1 ~]# yum install maven #使用 yum 安装 maven 会自动安装 jdk 和 ant
[root@hadoop1 ~]# 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”
[root@hadoop1 ~]# 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)
[root@hadoop1 ~]#
3. 编译安装 hadoop
[root@hadoop1 ~]# tar -zxf hadoop-2.7.4-src.tar.gz
[root@hadoop1 ~]# cd hadoop-2.7.4-src/
[root@hadoop1 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
Hadoop 项目之基于 CentOS7 的 Cloudera 5.10.1(CDH)的安装部署 http://www.linuxidc.com/Linux/2017-04/143095.htm
Hadoop2.7.2 集群搭建详解(高可用)http://www.linuxidc.com/Linux/2017-03/142052.htm
使用 Ambari 来部署 Hadoop 集群(搭建内网 HDP 源)http://www.linuxidc.com/Linux/2017-03/142136.htm
Ubuntu 14.04 下 Hadoop 集群安装 http://www.linuxidc.com/Linux/2017-02/140783.htm
CentOS 6.7 安装 Hadoop 2.7.2 http://www.linuxidc.com/Linux/2017-08/146232.htm
Ubuntu 16.04 上构建分布式 Hadoop-2.7.3 集群 http://www.linuxidc.com/Linux/2017-07/145503.htm
CentOS 7.3 下 Hadoop2.8 分布式集群安装与测试 http://www.linuxidc.com/Linux/2017-09/146864.htm
CentOS 7 下 Hadoop 2.6.4 分布式集群环境搭建 http://www.linuxidc.com/Linux/2017-06/144932.htm
Hadoop2.7.3+Spark2.1.0 完全分布式集群搭建过程 http://www.linuxidc.com/Linux/2017-06/144926.htm
更多 Hadoop 相关信息见 Hadoop 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=13
本文永久更新链接地址 :http://www.linuxidc.com/Linux/2017-10/147643.htm