Hive 1.1.0 集群安装配置

Hive

使用系统

CentOS 6.5

集群环境

组件 version
Hadoop 2.6.0
Zookeeper 3.4.6
Hive 1.1.0

Hive配置

解压这里就不讲解了

进入Hive根目录

cd /home/hadoop/development/src/hive-1.1.0-cdh5.6.0/

这里主要需要配置 hive-site.xml

好像从 1.1.0 版本需要自己配置 hive-site.xml 没有默认的了。

1.hive-site.xml

<configuration>
#mysql 数据配置
<property>
  <name>javax.jdo.option.ConnectionURLname>
  <value>jdbc:mysql://192.168.2.251:3306/hive?createDatabaseIfNotExist=truevalue>
  <description>JDBC connect string for a JDBC metastoredescription>
property>
#加载mysql jdbc驱动包
<property>
  <name>javax.jdo.option.ConnectionDriverNamename>
  <value>com.mysql.jdbc.Drivervalue>
  <description>Driver class name for a JDBC metastoredescription>
property>

<property>
  <name>javax.jdo.option.ConnectionUserNamename>
  <value>rootvalue>
  <description>username to use against metastore databasedescription>
property>

<property>
  <name>javax.jdo.option.ConnectionPasswordname>
  <value>rootvalue>
  <description>password to use against metastore databasedescription>
property>

#配置hive ui

<property> 
<name>hive.hwi.war.filename>
<value>lib/hive-hwi-1.1.0-cdh5.6.0.jarvalue>
<description>This sets the path to the HWI war file, relative to ${HIVE_HOME}. description>
property>

<property>
<name>hive.hwi.listen.hostname>
<value>0.0.0.0value>
<description>This is the host address the Hive Web Interface will listen ondescription>
property> 

<property>
<name>hive.hwi.listen.portname> 
<value>9999value> 
<description>This is the port the Hive Web Interface will listen ondescription>
property>
#配置 Hive 临时文件存储地址

configuration>
  1. >将mysql的驱动包放在 Hive根目录下的/lib目录下

mysql jdbc 驱动包

3.测试HIve

[hadoop@canbot130 hive-1.1.0-cdh5.6.0]$ hive
which: no hbase in (/home/hadoop/development/src/sqoop-1.4.6-cdh5.6.0/bin:/home/hadoop/development/src/hive-1.1.0-cdh5.6.0/bin:/home/hadoop/development/src/hadoop-2.6.0-cdh5.6.0/bin:/home/hadoop/development/src/hadoop-2.6.0-cdh5.6.0/sbin:/usr/jvm/jdk1.7.0_79/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/hadoop/development/src/zookeeper-3.4.5-cdh5.6.0/bin:/home/hadoop/bin)

Logging initialized using configuration in jar:file:/home/hadoop/development/src/hive-1.1.0-cdh5.6.0/lib/hive-common-1.1.0-cdh5.6.0.jar!/hive-log4j.properties
WARNING: Hive CLI is deprecated and migration to Beeline is recommended.
'hive>' 
启动成功!


  1. 测试是否连接mysql数据库

就不在这里测试了

你可能感兴趣的:(apache,hive)