2015-05-23
安裝環境:CentOS 6.5 64 bits
官方網站
http://hive.apache.org/
下載
http://ftp.mirror.tw/pub/apache/hive/
http://apache.stu.edu.tw/hive/stable/apache-hive-1.2.0-bin.tar.gz
安裝參考
https://cwiki.apache.org/confluence/display/Hive/GettingStarted#GettingStarted-InstallationandConfiguration
基本需求
Java
Hadoop
安裝
# 安裝 Hive
cd /usr/local
wget http://apache.stu.edu.tw/hive/stable/apache-hive-1.2.0-bin.tar.gz
tar xzvf apache-hive-1.2.0-bin.tar.gz
export HIVE_HOME=/usr/local/apache-hive-1.2.0-bin
export PATH=$HIVE_HOME/bin:$PATH
# 安裝 JAVA
yum -y install java java-devel
或
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.rpm
[root@localhost local]# rpm -ivh jdk-8u45-linux-x64.rpm
[root@localhost local]# find / -name java
find: ‘/run/user/1000/gvfs’: Permission denied
/etc/pki/ca-trust/extracted/java
/etc/pki/java
/etc/alternatives/java
/etc/java
/root/my-app/src/main/java
/root/my-app/src/test/java
/var/lib/alternatives/java
/usr/bin/java
/usr/lib/java
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.79-2.5.5.1.el7_1.x86_64/jre/bin/java
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.79-2.5.5.1.el7_1.x86_64/jre-abrt/bin/java
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.79-2.5.5.1.el7_1.x86_64/bin/java
/usr/lib/jvm/java
/usr/lib/jvm-exports/java
/usr/lib64/libreoffice/ure/share/java
/usr/lib64/libreoffice/share/Scripts/java
/usr/share/java
/usr/java
/usr/java/jdk1.8.0_45/bin/java
/usr/java/jdk1.8.0_45/jre/bin/java
[root@localhost local]#
[root@localhost local]# alternatives --config java
There are 3 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.79-2.5.5.1.el7_1.x86_64/jre/bin/java
2 /usr/java/jdk1.8.0_45/jre/bin/java
3 /usr/java/jdk1.8.0_45/bin/java
Enter to keep the current selection[+], or type selection number: 3
[root@localhost local]#
[root@localhost local]# java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
[root@localhost local]#
# 安裝 Hadoop 1.2.1 Binary
cd /usr/local
wget http://ftp.twaren.net/Unix/Web/apache/hadoop/common/hadoop-2.7.0/hadoop-2.7.0.tar.gz
tar zxvf hadoop-2.7.0.tar.gz
echo 'export HADOOP_HOME=/usr/local/hadoop-2.7.0' >> /etc/profile
echo 'export PATH=$PATH:$HADOOP_HOME/bin' >> /etc/profile
echo 'export PATH=$PATH:$HADOOP_HOME/sbin' >> /etc/profile
echo 'export HADOOP_PREFIX=$HADOOP_HOME' >> /etc/profile
echo 'export HADOOP_COMMON_HOME=$HADOOP_HOME' >> /etc/profile
echo 'export HADOOP_MAPRED_HOME=$HADOOP_HOME' >> /etc/profile
echo 'export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop' >> /etc/profile
echo 'export HADOOP_HDFS_HOME=$HADOOP_HOME' >> /etc/profile
echo 'export HADOOP_YARN_HOME=$HADOOP_HOME' >> /etc/profile
echo 'export YARN_CONF_DIR=$HADOOP_CONF_DIR' >> /etc/profile
source /etc/profile
wget http://archive.apache.org/dist/hadoop/core/hadoop-1.2.1/hadoop-1.2.1-bin.tar.gz
tar zxvf hadoop-1.2.1-bin.tar.gz
export HADOOP_HOME=/usr/local/hadoop-1.2.1
export PATH=$HADOOP_HOME/bin:$PATH
# 測試 Hive (按下 Ctrl-C 可中斷)
[root@localhost local]# $HIVE_HOME/bin/hive
Logging initialized using configuration in jar:file:/usr/local/apache-hive-1.2.0-bin/lib/hive-common-1.2.0.jar!/hive-log4j.properties
hive>
> [root@localhost local]#
[root@localhost local]#
(完)
相關
[研究] Apache Hive 1.2.0 (bin) + Hadoop 2.7.0 (bin) 安裝 (CentOS 7.1 x86_64)
http://shaurong.blogspot.com/2015/05/apache-hive-120-bin-hadoop-270-bin.html
[研究] Apache Hive 0.11 (bin) + Hadoop 1.2.1 (bin) 安裝 (CentOS 6.5 x64)
http://shaurong.blogspot.com/2015/05/apache-hive-120-bin-hadoop-270-bin.html
[研究] Hadoop 2.7.0 Single Cluster 安裝 (CentOS 7.1 x86_64)
http://shaurong.blogspot.tw/2015/05/hadoop-270-single-cluster-centos-71.html
[研究] Hadoop 2.2.0 編譯 (CentOS 6.4 x64)
http://shaurong.blogspot.tw/2013/11/hadoop-220-centos-64-x64.html
[研究] Hadoop 2.2.0 Single Cluster 安裝 (二)(CentOS 6.4 x64)
http://shaurong.blogspot.tw/2013/11/hadoop-220-single-cluster-centos-64-x64_7.html
[研究] Hadoop 2.2.0 Single Cluster 安裝 (一)(CentOS 6.4 x64)
http://shaurong.blogspot.tw/2013/11/hadoop-220-single-cluster-centos-64-x64.html
[研究] Hadoop 1.2.1 (rpm)安裝 (CentOS 6.4 x64)
http://shaurong.blogspot.tw/2013/10/hadoop-121-rpm-centos-64-x64.html
[研究] Hadoop 1.2.1 (bin)安裝 (CentOS 6.4 x64)
http://shaurong.blogspot.tw/2013/07/hadoop-112-centos-64-x64.html
[研究] Hadoop 1.2.1 安裝 (CentOS 6.4 x64)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=80035
[研究] 雲端軟體 Hadoop 1.0.0 安裝 (CentOS 6.2 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=21166
[研究] 雲端軟體 Hadoop 0.20.2 安裝 (CentOS 5.5 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=18513
[研究] 雲端軟體 Hadoop 0.20.2 安裝 (CentOS 5.4 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17974
沒有留言:
張貼留言