hive 安装

hive安装
下载压缩包
apache-hive-0.13.1-bin.tar.gz
解压
tar -zxvf apache-hive-0.13.1-bin.tar.gz
配置环境变量
  vi /etc/profile
export HIVE_HOME=/usr/local/hive
export PATH=$HIVE_HOME/bin

source /etc/profile

2 Contos 上安装mysql
直接运行命令
1. yum install -y mysql-server

 

 2. 启动mysql

service mysqld start

 

3.设置mysqld 每次启动自动运行

chkconfig mysqld on

4.使用yum安装mysql connector

yum install -y mysql-connector-java

 

 

5. 将mysql connector拷贝到hive的lib包中

cp /usr/share/java/mysql-connector-java-5.1.17.jar /usr/local/hive/lib

在mysql上创建hive元数据库,并对hive进行授权

create database if not exists hive_metadata;

grant all privileges on hive_metadata.* to 'hive'@'%' identified by 'hive';

grant all privileges on hive_metadata.* to 'hive'@'localhost' identified by 'hive';

grant all privileges on hive_metadata.* to 'hive'@'spark1' identified by 'hive';

grant all privileges on *.* to root@'%' identified by 'root';

flush privileges;

use hive_metadata;

 

 

 

 

 

posted @ 2019-11-28 22:01  愿无违  阅读(125)  评论(0编辑  收藏  举报