ENV: hive-0.12.0 hadoop2.3.0
1.install protobuf
a.download protobuf-2.5.0.tar.gz from https://code.google.com/p/protobuf/downloads/detail?name=protobuf-2.5.0.tar.gz
b. tar -xzf protobuf-2.5.0.tar.gz
c. #cd protobuf-2.5.0
d. #./configure
e. #make
f. #make check
g. #make install
2. install Ant
a. download apache-ant-1.9.2-bin.tar.gz from http://ant.apache.org/bindownload.cgi
b. #tar -xzvf apache-ant-1.9.2-bin.tar.gz
c. add the ANT_HOME and its bin dir to ~/.bashrc
d. # . ~/.bashrc // or #source ~/.bashrc
Note: If the ant already installed in your OS is not 1.9.3, you could skip this step.
3. build hive
a. #svn checkout http://svn.apache.org/repos/asf/hive/tags/release-0.12.0/ hive-0.12.0
b. change protobuf.version=2.4.1 to protobuf.version=2.5.0 hive-0.12.0/ivy/libraries.properties
c. #ant clean package -Dhadoop.version=2.3.0 -Dhadoop-0.23.version=2.3.0 -Dhadoop.mr.rev=23
d. when completed, the distribution dir is located in hive-0.12.0/build/dist.
Refrence
http://blog.csdn.net/chilianyi/article/details/21178587
https://cwiki.apache.org/confluence/display/Hive/GettingStarted#GettingStarted-CompileHivePriorto0.13onHadoop23