Hadoop 2.2.0 compilation and Installation

Source: Internet
Author: User

Add a user and access without a password

Add User adduser hadoop
Set Password passwd hadoop
Add to sudo User Group
Chmod + w/etc/sudoers
Echo '% hadoop ALL = (ALL) NOPASSWD: all'>/etc/sudoers
Chmod-w/etc/sudoers
Su hadoop
Ssh-keygen-t rsa

Machine Interconnection

Install maven

Sudo mkdir-p/opt/maven
Sudo chown-R hadoop: hadoop/opt/maven
Tar zxvf apache-maven-3.1.1-bin.tar.gz-C/opt/maven/

Install JDK

Sudo mkdir-p/opt/java
Sudo chown-R hadoop: hadoop/opt/java
Tar zxvf jdk-7u45-linux-x64.tar.gz-C/opt/java/

Configure Environment Variables

Sudo vim/etc/profile
Export JAVA_HOME =/opt/java/jdk1.7.0 _ 45
Export MAVEN_HOME =/opt/maven/apache-maven-3.1.1.
Export PATH = $ JAVA_HOME/bin: $ MAVEN_HOME/bin: $ PATH
Install protobuf
Wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2
Sudo mkdir-p/opt/protobuf
Sudo chown-R hadoop: hadoop/opt/protobuf
Tar jxvf protobuf-2.5.0.tar.bz2-C/opt/protobuf
Sudo yum install gcc
Cd/opt/protobuf/protobuf-2.5.0
./Configure
Make
Sudo make check
Sudo make install
Protoc -- version

Install hadoop 2.2.0

Tar zxvf hadoop-2.2.0-src.tar.gz

Patch

Cd hadoop-2.2.0-src
Wget https://issues.apache.org/jira/secure/attachment/12614482/HADOOP-10110.patch
Patch-p0 <HADOOP-10110.patch

Compile

Mvn clean install-DskipTests

Compile local packages

Sudo yum install cmake ncurses-devel openssl-devel-y
Mvn package-Pdist, native-DskipTests-Dtar

Verify installation successful

Cd/home/hadoop/hadoop-2.2.0-src/hadoop-dist/target/hadoop-2.2.0
Bin/hadoop version

Accelerate compilation on other machines

Scp-r ~ /. M2/kn02 :~ /

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.