Created
March 5, 2014 03:32
-
-
Save nojima/9360658 to your computer and use it in GitHub Desktop.
Build Hadoop 2.2.0 in Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -xe | |
sudo apt-get update | |
sudo apt-get install -y wget build-essential openjdk-7-jdk cmake maven pkg-config libssl-dev | |
# install protobuf | |
cd | |
wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz | |
tar xf protobuf-2.5.0.tar.gz | |
cd protobuf-2.5.0 | |
./configure | |
make | |
make check | |
sudo make install | |
sudo ldconfig | |
cd java | |
mvn test | |
sudo mvn install | |
# build hadoop | |
cd | |
wget http://ftp.tsukuba.wide.ad.jp/software/apache/hadoop/common/hadoop-2.2.0/hadoop-2.2.0-src.tar.gz | |
tar xf hadoop-2.2.0-src.tar.gz | |
cd hadoop-2.2.0-src | |
patch -p0 <<EOF | |
--- hadoop-common-project/hadoop-auth/pom.xml | |
+++ hadoop-common-project/hadoop-auth/pom.xml | |
@@ -54,6 +54,11 @@ | |
</dependency> | |
<dependency> | |
<groupId>org.mortbay.jetty</groupId> | |
+ <artifactId>jetty-util</artifactId> | |
+ <scope>test</scope> | |
+ </dependency> | |
+ <dependency> | |
+ <groupId>org.mortbay.jetty</groupId> | |
<artifactId>jetty</artifactId> | |
<scope>test</scope> | |
</dependency> | |
EOF | |
mvn package -Pdist,native -DskipTests -Dtar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Distribution Package:
hadoop-2.2.0-src/hadoop-dist/target/hadoop-2.2.0.tar.gz