Hadoop 1.0.4 source code compilation in Ubuntu
Local Environment:
Ubuntu12.04 32-bit and jdk 1.7
(1) maven-3.2.2 Installation
First download it from the maven official website, http://maven.apache.org/here I download the latest version, maven-3.2.2
Decompress the package to the/usr/local/directory: tar-zxvf apache-maven-3.2.2-bin.tar.gz and rename it maven
Modify/etc/profile:
Add two variables and save them:
Export M2_HOME =/usr/local/maven
Export PATH =.: $ M2_HOME/bin: $ PATH
Enter source/etc/profile on the terminal
To test whether the installation is successful, enter mvn-v on the terminal. If the following prompt appears, the installation is successful:
Maven official guide _ Chinese full version clear PDF
Install Maven in Linux
Maven3.0 configuration and simple use
Set up sun-jdk and Maven2 in Ubuntu
Get started with Maven
(2) install ant-1.9.4
First download to Ant official website, http://ant.apache.org/, here I download the latest version, ant-1.9.4
Decompress the package to the/usr/local/directory: tar-zxvf apache-ant-1.9.4-bin.tar.gz and rename it to ant
Modify/etc/profile:
Add two variables and save them:
Export ANT_HOME =/usr/local/ant
Export PATH =.: $ ANT_HOME/bin: $ PATH
Enter source/etc/profile on the terminal
To test whether the installation is successful, enter "ant-version" on the terminal. If the following prompt appears, the installation is successful:
For details about how to download Apache Ant, see
Android compilation tool Ant
(3) protobuf-2.5.0 Installation
Download the latest version from the official protobuf website at https://code.google.com/p/protobuf/downloads/list.
Decompress the package to the/usr/local/directory: tar-zxvf protobuf-2.5.0.tar.gz and rename it protobuf
Before the next installation, We need to install some necessary libraries or software:
Apt-get install build-essential
Apt-get install autoconf
Apt-get install automake
Apt-get install libtool
Next, follow these steps to install A,./configure B, make C, make check D, and make install.
Replace rpc return values in Hadoop with protobuf
(4) jdk1.6 Installation
See the previous article. It is best not to install JDK. Some compatibility problems may cause the installation to fail.
Install JDK 7 In Ubuntu (with Clojure download)
Install JDK 12.04 in Ubuntu
CentOS6.3 install JDK and environment Configuration
For more details, please continue to read the highlights on the next page: