Recently installed Hive 2.1.1 on Ubuntu 16.04. Maybe not optimal steps, but it worked for me.
Installation
1. Download Hive from https://hive.apache.org/downloads.html, unpack archive to folder /opt/hive
2. Copy /opt/hive/conf/hive-default.xml.template to hive-site.xml
Edit hive-site.xml, replace all occurences of ${system:java.io.tmpdir}/${system:user.name} with /tmp/hive
3. Hadoop already exists in /opt/hadoop folder. Hadoop installation steps are here: http://dmitrypukhov.pro/install-hadoop-on-ubuntu/. Start dfs and yarn if are not started yet:
1 2 |
/opt/hadoop/sbin/start-dfs.sh /opt/hadoop/sbin/start-yarn.sh |
4. To avoid yarn.resourcemanager errors in log, add into /opt/hive/conf/hive-site.xml
1 2 3 4 |
<property> <name>yarn.resourcemanager.address</name> <value>127.0.0.1</value> </property> |
5.Run hive
1 |
/opt/hive/bin/hiveserver2 |
6. Url localhost:10002 should show hive web UI in browser
7. Or try to start beeline client /opt/hive/beeline -u jdbc:hive2://
8. Try language manual https://cwiki.apache.org/confluence/display/Hive/LanguageManual
Troubleshooting
1. I got metastore exception, fixed it with init derby schema and restarted hive
1 |
/opt/hive/bin/schematool -initSchema -dbType derby |
2. Impersonation exception, my fix was to set hive.server2.enable.doAs to false in hive-site.xml