2014年8月7日 星期四

[研究] hadoop-2.4.1-src.tar.gz 快速編譯安裝程式(CentOS 7.0 x86_64)

[研究] hadoop-2.4.1-src.tar.gz 快速編譯安裝程式(CentOS 7.0 x86_64)

2014-08-07

下載
http://www.apache.org/dyn/closer.cgi/hadoop/common/
http://apache.stu.edu.tw/hadoop/common/hadoop-2.4.1/hadoop-2.4.1.tar.gz

程式內容如下

#!/bin/bash

echo -e "\033[31m"
echo -e "Program : Hadoop-2.4.1_CentOS-7.0-x86_64-Compile.sh "
echo -e "Hadoop 2.4.1 Compile Shell Script (CentOS 7.0 x86_64) "
echo -e "by Shau-Rong Lu 2014-08-07 "
echo -e "\033[0m"

cd /usr/local/src
#yum -y groupinstall  "Development tools"
yum -y install gcc  gcc-c++  svn  cmake git zlib zlib-devel openssl openssl-devel rsync java-1.7.0-openjdk.x86_64 java-1.7.0-openjdk-devel.x86_64  make  wget

# echo "********** Install OpenJDK **********"

yum -y install  java
# or
#yum -y install java-1.7.0-openjdk

yum -y install  java-1.7.0-openjdk-devel

#export JAVA_HOME=/usr
#echo 'export JAVA_HOME=/usr' >> /etc/profile
#echo 'export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el7_0.x86_64' >> /etc/profile
echo 'export JAVA_HOME=/usr/lib/jvm/java' >> /etc/profile
echo 'export PATH=$PATH:$JAVA_HOME/bin' >> /etc/profile
echo 'export CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar' >> /etc/profile

source /etc/profile
java -version
#export | grep JAVA
#export | grep jdk

echo "********** Install Apache Maven 3.0.5 (yum) **********"

yum -y install maven

# mvn -version

echo "********** Install FindBugs 3.0.0 **********"

cd  /usr/local/src
if [ ! -s findbugs-3.0.0.tar.gz ]; then
  wget  http://jaist.dl.sourceforge.net/project/findbugs/findbugs/3.0.0/findbugs-3.0.0.tar.gz
fi
tar zxvf findbugs-3.0.0.tar.gz -C /usr/local/
ln -s /usr/local/findbugs-3.0.0/bin/findbugs  /usr/bin/findbugs
echo 'export FINDBUGS_HOME=/usr/local/findbugs-3.0.0' >> /etc/profile
echo 'export PATH=$PATH:$FINDBUGS_HOME/bin' >> /etc/profile
source /etc/profile

#export | grep FINDBUGS_HOME
#export | grep PATH
#read -n 1 -p "Press Enter to continue..."

echo "********** Install Protoc 2.5.0 **********"
# https://code.google.com/p/protobuf/
# https://code.google.com/p/protobuf/downloads/list

cd  /usr/local/src
if [ ! -s protobuf-2.5.0.tar.gz ]; then
  wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz
fi
tar zxvf protobuf-2.5.0.tar.gz -C /usr/local/src
cd /usr/local/src/protobuf-2.5.0
./configure
make
make install
ln -s /usr/local/bin/protoc /usr/bin/protoc
echo 'export PROTO_HOME=/usr/local/' >> /etc/profile
echo 'export PATH=$PATH:$PROTO_HOME/bin' >> /etc/profile
source /etc/profile
#read -n 1 -p "Press Enter to continue..."

echo "********** Compile Hadoop 2.4.1 **********"

cd  /usr/local/src
if [ ! -s hhadoop-2.4.1-src.tar.gz ]; then
  #wget http://apache.stu.edu.tw/hadoop/common/hadoop-2.4.1/hadoop-2.4.1.tar.gz
  wget http://apache.cdpa.nsysu.edu.tw/hadoop/common/stable2/hadoop-2.4.1-src.tar.gz
  #wget http://ftp.twaren.net/Unix/Web/apache/hadoop/common/hadoop-2.2.0/hadoop-2.2.0.tar.gz
  #wget http://ftp.mirror.tw/pub/apache/hadoop/common/hadoop-2.2.0/hadoop-2.2.0-src.tar.gz
  #wget http://apache.stu.edu.tw/hadoop/common/hadoop-2.2.0/hadoop-2.2.0-src.tar.gz
fi
tar zxvf hadoop-2.4.1-src.tar.gz -C /usr/local/src
cd  /usr/local/src/hadoop-2.4.1-src/

#mvn clean
mvn package -Pdist,native -DskipTests -Dtar
#read -n 1 -p "Press Enter to continue..."



執行結果

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Hadoop Main ................................. SUCCESS [01:59 min]
[INFO] Apache Hadoop Project POM .......................... SUCCESS [01:03 min]
[INFO] Apache Hadoop Annotations .......................... SUCCESS [ 23.012 s]
[INFO] Apache Hadoop Assemblies ........................... SUCCESS [  0.237 s]
[INFO] Apache Hadoop Project Dist POM ..................... SUCCESS [ 27.052 s]
[INFO] Apache Hadoop Maven Plugins ........................ SUCCESS [ 44.828 s]
[INFO] Apache Hadoop MiniKDC .............................. SUCCESS [03:55 min]
[INFO] Apache Hadoop Auth ................................. SUCCESS [ 49.530 s]
[INFO] Apache Hadoop Auth Examples ........................ SUCCESS [ 12.731 s]
[INFO] Apache Hadoop Common ............................... SUCCESS [04:17 min]
[INFO] Apache Hadoop NFS .................................. SUCCESS [ 17.288 s]
[INFO] Apache Hadoop Common Project ....................... SUCCESS [  0.020 s]
[INFO] Apache Hadoop HDFS ................................. SUCCESS [03:41 min]
[INFO] Apache Hadoop HttpFS ............................... SUCCESS [01:05 min]
[INFO] Apache Hadoop HDFS BookKeeper Journal .............. SUCCESS [ 29.745 s]
[INFO] Apache Hadoop HDFS-NFS ............................. SUCCESS [  4.118 s]
[INFO] Apache Hadoop HDFS Project ......................... SUCCESS [  0.051 s]
[INFO] hadoop-yarn ........................................ SUCCESS [  0.026 s]
[INFO] hadoop-yarn-api .................................... SUCCESS [01:01 min]
[INFO] hadoop-yarn-common ................................. SUCCESS [ 53.737 s]
[INFO] hadoop-yarn-server ................................. SUCCESS [  1.244 s]
[INFO] hadoop-yarn-server-common .......................... SUCCESS [ 10.086 s]
[INFO] hadoop-yarn-server-nodemanager ..................... SUCCESS [01:05 min]
[INFO] hadoop-yarn-server-web-proxy ....................... SUCCESS [  3.358 s]
[INFO] hadoop-yarn-server-applicationhistoryservice ....... SUCCESS [ 18.990 s]
[INFO] hadoop-yarn-server-resourcemanager ................. SUCCESS [ 15.584 s]
[INFO] hadoop-yarn-server-tests ........................... SUCCESS [  2.639 s]
[INFO] hadoop-yarn-client ................................. SUCCESS [  5.701 s]
[INFO] hadoop-yarn-applications ........................... SUCCESS [  0.023 s]
[INFO] hadoop-yarn-applications-distributedshell .......... SUCCESS [  2.864 s]
[INFO] hadoop-yarn-applications-unmanaged-am-launcher ..... SUCCESS [  1.749 s]
[INFO] hadoop-yarn-site ................................... SUCCESS [  0.021 s]
[INFO] hadoop-yarn-project ................................ SUCCESS [  4.698 s]
[INFO] hadoop-mapreduce-client ............................ SUCCESS [  0.079 s]
[INFO] hadoop-mapreduce-client-core ....................... SUCCESS [ 27.055 s]
[INFO] hadoop-mapreduce-client-common ..................... SUCCESS [ 19.449 s]
[INFO] hadoop-mapreduce-client-shuffle .................... SUCCESS [  3.613 s]
[INFO] hadoop-mapreduce-client-app ........................ SUCCESS [  9.988 s]
[INFO] hadoop-mapreduce-client-hs ......................... SUCCESS [  8.550 s]
[INFO] hadoop-mapreduce-client-jobclient .................. SUCCESS [ 18.732 s]
[INFO] hadoop-mapreduce-client-hs-plugins ................. SUCCESS [  1.884 s]
[INFO] Apache Hadoop MapReduce Examples ................... SUCCESS [  6.837 s]
[INFO] hadoop-mapreduce ................................... SUCCESS [  3.803 s]
[INFO] Apache Hadoop MapReduce Streaming .................. SUCCESS [ 10.751 s]
[INFO] Apache Hadoop Distributed Copy ..................... SUCCESS [ 25.304 s]
[INFO] Apache Hadoop Archives ............................. SUCCESS [  2.769 s]
[INFO] Apache Hadoop Rumen ................................ SUCCESS [  7.217 s]
[INFO] Apache Hadoop Gridmix .............................. SUCCESS [  5.446 s]
[INFO] Apache Hadoop Data Join ............................ SUCCESS [  3.070 s]
[INFO] Apache Hadoop Extras ............................... SUCCESS [  3.038 s]
[INFO] Apache Hadoop Pipes ................................ SUCCESS [  6.894 s]
[INFO] Apache Hadoop OpenStack support .................... SUCCESS [  6.921 s]
[INFO] Apache Hadoop Client ............................... SUCCESS [  6.529 s]
[INFO] Apache Hadoop Mini-Cluster ......................... SUCCESS [  0.145 s]
[INFO] Apache Hadoop Scheduler Load Simulator ............. SUCCESS [ 39.579 s]
[INFO] Apache Hadoop Tools Dist ........................... SUCCESS [  4.833 s]
[INFO] Apache Hadoop Tools ................................ SUCCESS [  0.018 s]
[INFO] Apache Hadoop Distribution ......................... SUCCESS [ 24.701 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 28:23 min
[INFO] Finished at: 2014-08-07T00:34:25+08:00
[INFO] Final Memory: 154M/463M
[INFO] ------------------------------------------------------------------------
[root@localhost hadoop-2.4.1-src]#


(完)


相關

[研究] hadoop-2.4.1-src.tar.gz 快速編譯安裝程式(CentOS 7.0 x86_64)
http://shaurong.blogspot.com/2014/08/hadoop-241-srctargz-centos-70-x8664.html
http://download.ithome.com.tw/article/index/id/2375

[研究] hadoop-2.2.0-src.tar.gz 快速編譯安裝程式(二)(CentOS 6.5 x86_64)
http://shaurong.blogspot.com/2014/02/hadoop-220-srctargz-centos-65-x8664_8080.html

[研究] hadoop-2.2.0-src.tar.gz 快速編譯安裝程式(CentOS 6.5 x86_64)
http://shaurong.blogspot.com/2014/02/hadoop-220-srctargz-centos-65-x8664_7.html

[研究] hadoop-2.2.0-src.tar.gz 編譯研究(CentOS 6.5 x86_64)
http://shaurong.blogspot.com/2014/02/hadoop-220-srctargz-centos-65-x8664.html

[研究] Hadoop 2.2.0 編譯 (CentOS 6.4 x64)
http://shaurong.blogspot.tw/2013/11/hadoop-220-centos-64-x64.html

[研究] Hadoop 2.2.0 Single Cluster 安裝 (二)(CentOS 6.4 x64)
http://shaurong.blogspot.tw/2013/11/hadoop-220-single-cluster-centos-64-x64_7.html

[研究] Hadoop 2.2.0 Single Cluster 安裝 (一)(CentOS 6.4 x64)
http://shaurong.blogspot.tw/2013/11/hadoop-220-single-cluster-centos-64-x64.html

[研究] Hadoop 1.2.1 (rpm)安裝 (CentOS 6.4 x64)
http://shaurong.blogspot.tw/2013/10/hadoop-121-rpm-centos-64-x64.html

[研究] Hadoop 1.2.1 (bin)安裝 (CentOS 6.4 x64)
http://shaurong.blogspot.tw/2013/07/hadoop-112-centos-64-x64.html

[研究] Hadoop 1.2.1 安裝 (CentOS 6.4 x64)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=80035

[研究] 雲端軟體 Hadoop 1.0.0 安裝 (CentOS 6.2 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=21166

[研究] 雲端軟體 Hadoop 0.20.2 安裝 (CentOS 5.5 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=18513

[研究] 雲端軟體 Hadoop 0.20.2 安裝 (CentOS 5.4 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17974

沒有留言:

張貼留言