1、解压apache-hive-1.2.1-bin.tar.gz到/opt/module/目录下面
[victor@node1 software]$ tar -xzvf apache-hive-1.2.1-bin.tar.gz -C /opt/module/
2、添加apache-hive-1.2.1-bin 软连接
[victor@node1 ~]$ cd /opt/module
[victor@node1 module]$ ln -s apache-hive-1.2.1-bin hive
3、修改/opt/module/hive/conf目录下的hive-env.sh.template名称为hive-env.sh
[victor@node1 module]$ cd hive/conf/
[victor@node1 conf]$ mv hive-env.sh.template hive-env.sh
4、配置hive-env.sh文件
[victor@node1 conf]$ vim hive-env.sh
export HADOOP_HOME=/opt/module/hadoop-2.8.2
export HIVE_CONF_DIR=/opt/module/hive/conf
5、替换zookeeper相对应的jar包
[victor@node1 ~]# cd /opt/module/hive/lib/
[victor@node1 lib]# rm -rf zookeeper-3.4.6.jar
[victor@node1 lib]# cp /opt/module/zookeeper-3.4.10/zookeeper-3.4.10.jar ./
6、必须启动hdfs和yarn
[victor@node1 hadoop-2.8.2]$ sbin/start-dfs.sh
[victor@node2 hadoop-2.8.2]$ sbin/start-yarn.sh
7、在HDFS上创建/tmp和/user/hive/warehouse两个目录并修改他们的同组权限可写
[victor@node1 hadoop-2.8.2]$ bin/hadoop fs -mkdir /tmp
[victor@node1 hadoop-2.8.2]$ bin/hadoop fs -mkdir -p /user/hive/warehouse
[victor@node1 hadoop-2.8.2]$ bin/hadoop fs -chmod g+w /tmp
[victor@node1 hadoop-2.8.2]$ bin/hadoop fs -chmod g+w /user/hive/warehouse
[victor@node1 hadoop-2.8.2]$ bin/hadoop fs -lsr /tmp
8、启动hive
[victor@node1 hive]$ bin/hive