The installation of hive is relatively straightforward, as there is no need to modify too many configuration files
1. Download, unzip
I put him in the/usr/hadoop/hive.
2. Set the environment variables. (It doesn't seem to be set or anything)
Vim/etc/profileexport Java_home=/usr/java/jdk8export Hadoop_home=/usr/hadoop/hadoop...export HIVE_HOME=/usr/ Hadoop/hiveexport hive_conf_dir= $HIVE _home/hive-confexport path= $HIVE _home/bin: $HADOOP _home/bin: $JAVA _home/bin:/ Sbin/:/bin: $PATH
3. Configure Hive
Cp-r $HIVE _home/conf $HIVE _conf_dir/
CD $HIVE _conf_dir/
CP Hive-default.xml.template Hive-default.xml
CP Hive-env.sh.template hive.env.sh
Vim hive-env.sh
Export hadoop_heapsize=512
Export hive_conf_dir=/usr/hadoop/hive/hive-conf
4. Test:
Hive
This is the same state as SQL into hive.
However, it may also be an error
There could be a problem with permissions
Remember what permissions need to writable, but currently for ...
Just set the folder permissions to 777
Chmod-r 777 File
hive> show tables;
OK
Time taken:4.824 seconds
hive> CREATE TABLE hwz (id int, name string);
OK
Time taken:0.566 seconds
hive> SELECT * from HWZ;
OK
Time taken:0.361 seconds
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Installation of Hive