上傳hive-0.11.0.tar.gz 和 mysqljava
[root@master installer]# mv hive-0.11.0.tar.gz /home/hadoop/installer/mysql
[root@master installer]# chown hadoop hive-0.11.0.tar.gz linux
[root@master installer]# llsql
總計 415592數據庫
-rw-r--r-- 1 hadoop hadoop 221498499 10-15 09:36 eclipse-jee-indigo-SR2-linux-gtk.tar.gzbash
-rw-r--r-- 1 root root 63851630 10-15 02:14 hadoop-1.2.1.tar.gzeclipse
drwxr-xr-x 2 root root 4096 10-16 03:41 hadoop-eclipse-plugin-1.2.1oop
-rw-r--r-- 1 hadoop hadoop 5856049 10-16 03:38 hadoop-eclipse-plugin-1.2.1.zipspa
-rw-r--r-- 1 root root 58955520 10-24 01:55 hbase-0.94.16-security.tar.gz.net
-rw-r--r-- 1 hadoop root 74945460 11-13 04:47 hive-0.11.0.tar.gz
[root@master installer]# su – hadoop
配置環境變量
[hadoop@master ~]$ vi .bashrc
export JAVA_HOME=/usr/java/jdk1.6.0_27
export HADOOP1_HOME=/home/hadoop/hadoop
export HBASE_HOME=/home/hadoop/hbase
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib
export HIVE_HOME=/home/hadoop/hive
export PATH=$PATH:$JAVA_HOME/bin:$HADOOP1_HOME/bin:$HBASE_HOME/bin:$HIVE_HOME/bin
解壓縮hive
[hadoop@master ~]$ cd installer/
[hadoop@master installer]$ tar xzf hive-0.11.0.tar.gz
移動
[hadoop@master installer]$ mv hive-0.11.0 ..
[hadoop@master installer]$ cd ..
軟鏈接
[hadoop@master ~]$ ln -s hive-0.11.0/ hive
使生效
[hadoop@master ~]$ source .bashrc
[hadoop@master ~]$ cd hive
因爲是內嵌模式,直接使用derby數據庫
[hadoop@master hive]$ hive
Logging initialized using configuration in jar:file:/home/hadoop/hive-0.11.0/lib/hive-common-0.11.0.jar!/hive-log4j.properties
Hive history file=/tmp/hadoop/hive_job_log_hadoop_28062@master_201411130457_482280544.txt
hive> show tables;
OK
Time taken: 20.797 seconds
hive>