十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
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