一 上传安装包
[root@localhost ~]# ll apache-hive-0.13.0-bin.tar.gz
-rw-r--r--. 1 root root 54107819 Aug 21 21:16 apache-hive-0.13.0-bin.tar.gz
二 确认hadoop正常运行
[root@localhost ~]# jps
3855 TaskTracker
4000 Jps
3222 NameNode
3576 SecondaryNameNode
3365 DataNode
3684 JobTracker
三 解压安装包
[root@localhost ~]# tar -zxvf apache-hive-0.13.0-bin.tar.gz
[root@localhost apache-hive-0.13.0-bin]# ls
bin conf examples hcatalog lib LICENSE NOTICE README.txt RELEASE_NOTES.txt scripts
[root@localhost bin]# ls
beeline ext hive hive-config.sh hiveserver2 metatool schematool
四 运行hive
[root@localhost bin]# ./hive
Logging initialized using configuration in jar:file:/root/apache-hive-0.13.0-bin/lib/hive-common-0.13.0.jar!/hive-log4j.properties
hive> quit;
[root@localhost bin]# ls
beeline derby.log ext hive hive-config.sh hiveserver2 metastore_db metatool schematool
五 加入到PATH环境变量中
[root@localhost bin]# pwd
/root/apache-hive-0.13.0-bin/bin
[root@localhost bin]# vi ~/.bash_profile
HIVE_HOME=/root/apache-hive-0.13.0-bin
export PATH=$HIVE_HOME/bin:$PATH
[root@localhost apache-hive-0.13.0-bin]# source ~/.bash_profile
[root@localhost apache-hive-0.13.0-bin]# hive
Logging initialized using configuration in jar:file:/root/apache-hive-0.13.0-bin/lib/hive-common-0.13.0.jar!/hive-log4j.properties
hive> quit;
[root@localhost apache-hive-0.13.0-bin]# ls
bin conf derby.log examples hcatalog lib LICENSE metastore_db NOTICE README.txt RELEASE_NOTES.txt scripts