|
Oracle Linux 5.8 64bit operating system
1.yum CD source settings
vi /etc/yum.repos.d/rhel-debuginfo.repo
[Base]
name = Server Local Sources
baseurl = file: /// media / Server
enabled = 1
gpcheck = 1
gpgkey = file: /// media / RPM-GPG-KEY-oracle
2. Because it is a minimal installation of the system, you need to install the following packages
[Root @ hadoop1 ~] # yum install lzo-devel zlib-devel gcc autoconf automake libtool ncurses-devel openssl-deve
3. Install maven
According to the Internet to look up the latest maven3.1.1 and hadoop2.2.0 compatibility issues here with maven3.0.5
[Root @ hadoop1 ~] # wget http://mirrors.cnnic.cn/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
Because downloading is already compiled, it can be directly extracted
[Root @ hadoop1 ~] # tar zxvf apache-maven-3.0.5-bin.tar.gz -C / usr / local /
[Root @ hadoop1 ~] # mv /usr/local/apache-maven-3.0.5/ / usr / local / maven
Setting environment variables
[Root @ hadoop1 local] # vi / etc / profile
Add the following
export MAVEN_HOME = / usr / local / maven
4. Install ant
[Root @ hadoop1 ~] # wget http://mirror.esocc.com/apache//ant/binaries/apache-ant-1.9.3-bin.tar.gz
[Root @ hadoop1 ~] # tar zxvf apache-ant-1.9.3-bin.tar.gz -C / usr / local /
[Root @ hadoop1 ~] # mv /usr/local/apache-ant-1.9.3/ / usr / local / ant
[Root @ hadoop1 ~] # vi / etc / profile
export ANT_HOME = / usr / local / ant
5. Install findbugs
[Root @ hadoop1 ~] # wget http://prdownloads.sourceforge.net/findbugs/findbugs-2.0.3.tar.gz?download
[Root @ hadoop1 ~] # tar zxvf findbugs-2.0.3.tar.gz -C / usr / local /
[Root @ hadoop1 ~] # mv /usr/local/findbugs-2.0.3/ / usr / local / findbugs
[Root @ hadoop1 ~] # vi / etc / profile
export FINDBUGS_HOME = / usr / local / findbugs
6. Install protobuf
[Root @ hadoop1 ~] # wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz
[Root @ hadoop1 ~] # tar zxvf protobuf-2.5.0.tar.gz
[Root @ hadoop1 ~] # cd protobuf-2.5.0
[Root @ hadoop1 protobuf-2.5.0] # ./configure
It reported a mistake here:
configure: error: in `/root/protobuf-2.5.0 ':
configure: error: C ++ preprocessor "/ lib / cpp" fails sanity check
C ++ compiler is not installed
[Root @ hadoop1 protobuf-2.5.0] # yum install gcc-c ++
Then recompile and install protobuf
[Root @ hadoop1 protobuf-2.5.0] # ./configure
[Root @ hadoop1 protobuf-2.5.0] # make
[Root @ hadoop1 protobuf-2.5.0] # make install
7. The above several software added PATH variable
[Root @ hadoop1 ~] # vi / etc / profile
export PATH = $ PATH: $ MAVEN_HOME / bin: $ ANT_HOME / bin: $ FINDBUGS_HOME / bin
Run profile makes these configuration takes effect
[Root @ hadoop1 ~] # source / etc / profile
8. Compile hadoop
[Root @ hadoop1 ~] # wget http://mirror.esocc.com/apache/hadoop/common/hadoop-2.2.0/hadoop-2.2.0-src.tar.gz
[Root @ hadoop1 ~] # tar zxvf hadoop-2.2.0-src.tar.gz
Here Richard hadoop2.2.0 online source package there is also a bug:
https://issues.apache.org/jira/browse/HADOOP-10110
According HADOOP-10110.patch, make the following changes:
[Root @ hadoop1 hadoop-2.2.0-src] # vi hadoop-common-project / hadoop-auth / pom.xml
|
|
|
|