hadoop集群中安装hive+mysql

一、安装MySQL
详情请看http://blog.csdn.net/intelligebce/article/details/78481214
二、hive安装及其配置
hive-site.xml的配置:

 
   javax.jdo.option.ConnectionUserName
   root
    Username to use against metastore database


javax.jdo.option.ConnectionPassword
root
password to use against metastore database



javax.jdo.option.ConnectionURL
jdbc:mysql://slave2:3306/hive?createDatabaseIfNotExist=true&useSSL=false
JDBC connect string for a JDBC metastore


hive.metastore.warehouse.dir
/hive/warehouse   ##需要在hdfs上建立想要的目录
location of default database for the warehouse,Hive在HDFS上的根目录
      


hive.exec.local.scratchdir
/hive/exec
Local scratch space for Hive jobs



hive.downloaded.resources.dir
/hive/downloadedsource
Temporary local directory for added resources in the remote file system.

 
 javax.jdo.option.ConnectionDriverName
com.mysql.jdbc.Driver
  Driver class name for a JDBC    metastore                      
   

hive-env.sh的配置:
在尾部添加:
export HIVE_HOME=/usr/local/hive-1.2.2
export HIVE_CONF_DIR=/usr/local/hive-1.2.2/conf

bin目录下的hive-config.sh
export HADOOP_HOME=/usr/local/hadoop-2.7.4
export SPARK_HOME=/usr/local/spark-2.2.1/
export JAVA_HOME=/usr/local/jdk1.8.0_141

你可能感兴趣的:(mysql,centos7)