Skip to content

Instantly share code, notes, and snippets.

@igorbarinov
Last active August 29, 2015 14:22
Show Gist options
  • Save igorbarinov/fdb226bdc5158135733e to your computer and use it in GitHub Desktop.
Save igorbarinov/fdb226bdc5158135733e to your computer and use it in GitHub Desktop.

If you really want to install Hive and Spark on one host

  • Create /usr/local/hive/conf/hive-site.xml

https://gist.github.com/igorbarinov/569f0440bf26f7ddf15f

  • Add HADOOP_USER_CLASSPATH_FIRST to ~/.profile

export HADOOP_USER_CLASSPATH_FIRST=true

And source it

. ~/.profile

  • Install MySQL

sudo apt-get install mysql-server

  • Install Java Connector

sudo apt-get install libmysql-java

  • Copy Java Connector to Hive Libs

cp /usr/share/java/mysql* /usr/local/hive/lib

  • Set up MySQL

mysql -u root -p

mysql> CREATE DATABASE metastore;

mysql> USE metastore;

  • Setup user account

mysql> CREATE USER 'hive'@'%' IDENTIFIED BY 'mypassword';

mysql> GRANT all on *.* to 'hive'@localhost identified by 'mypassword';

mysql> flush privileges;

mysql> SOURCE /usr/local/hive/scripts/metastore/upgrade/mysql/hive-schema-1.2.0.mysql.sql;

  1. Run hive

hive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment