你好,游客 登录 注册 搜索
背景:
阅读新闻

Hadoop-2.7.4编译安装

[日期:2017-10-15] 来源:Linux社区  作者:lullaby [字体: ]

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.chineselinuxuniversity.net/Linux/2017-04/143095.htm

Hadoop2.7.2集群搭建详解(高可用)  http://www.chineselinuxuniversity.net/Linux/2017-03/142052.htm

使用Ambari来部署Hadoop集群(搭建内网HDP源)  http://www.chineselinuxuniversity.net/Linux/2017-03/142136.htm

Ubuntu 14.04下Hadoop集群安装  http://www.chineselinuxuniversity.net/Linux/2017-02/140783.htm

CentOS 6.7安装Hadoop 2.7.2  http://www.chineselinuxuniversity.net/Linux/2017-08/146232.htm

Ubuntu 16.04上构建分布式Hadoop-2.7.3集群  http://www.chineselinuxuniversity.net/Linux/2017-07/145503.htm

CentOS 7.3下Hadoop2.8分布式集群安装与测试  http://www.chineselinuxuniversity.net/Linux/2017-09/146864.htm

CentOS 7 下 Hadoop 2.6.4 分布式集群环境搭建  http://www.chineselinuxuniversity.net/Linux/2017-06/144932.htm

Hadoop2.7.3+Spark2.1.0完全分布式集群搭建过程  http://www.chineselinuxuniversity.net/Linux/2017-06/144926.htm

更多Hadoop相关信息见Hadoop 专题页面 http://www.chineselinuxuniversity.net/topicnews.aspx?tid=13

本文永久更新链接地址http://www.chineselinuxuniversity.net/Linux/2017-10/147643.htm

linux
相关资讯       Hadoop编译安装 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款