Skip to content

Instantly share code, notes, and snippets.

@nojima
Created March 5, 2014 03:32
Show Gist options
  • Save nojima/9360658 to your computer and use it in GitHub Desktop.
Save nojima/9360658 to your computer and use it in GitHub Desktop.
Build Hadoop 2.2.0 in Ubuntu
#!/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
@nojima
Copy link
Author

nojima commented Mar 5, 2014

Distribution Package: hadoop-2.2.0-src/hadoop-dist/target/hadoop-2.2.0.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment