概述
hive安装配置
Title: hive安装配置
Author:liguangman
Email: 2990244047@qq.com(qq邮箱一出现瞬间low到爆)
安装元数据服务(mysql)
rpm -qa | grep mariadb
rpm -e mariadb-libs-5.5.35-3.el7.x86_64 --nodeps
rpm -ivh mysql-community-common-5.7.18-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.18-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.18-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.18-1.el7.x86_64.rpm
rpm -ivh mysql-community-devel-5.7.18-1.el7.x86_64.rpm
修改root用户密码
ALTER user 'root'@'localhost' IDENTIFIED BY 'Huawei12#$';
设置root用户远程访问
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Huawei12#$' WITH GRANT OPTION;
flush privileges;
拷贝mysql驱动包
cp mysql-connector-java-5.1.47-bin.jar /hadoop/hive-2.3.4/lib/
解压hive安装包
tar -xvf apache-hive-2.3.4-bin.tar.gz -C /hadoop/
重命名
mv apache-hive-2.3.4-bin/ hive-2.3.4
设置HIVE环境变量
配置环境变量
vim /etc/profile
export
HIVE_HOME=/hadoop/hive-2.3.4
export
PATH=$HIVE_HOME/bin:$PATH
source /etc/profile
修改hive配置文件
cd /hadoop/hive-2.3.4/conf
vim hive-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hive.metastore.schema.verification</name>
<value>false</value>
</property>
<property>
<name>hive.metastore.local</name>
<value>true</value>
</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/database/hive/warehouse</value>
</property>
<property>
<name>hive.metastore.local</name>
<value>true</value>
</property>
<property>
<name>datanucleus.schema.autoCreateAll</name>
<value>true</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://hadoop:3306/hive?createDatabaseIfNotExist=true&characterEncoding=UTF-8&useSSL=false</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriveName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>Huawei12#$</value>
</property>
</configuration>
最后
以上就是健忘老虎为你收集整理的hive安装配置(单机版)的全部内容,希望文章能够帮你解决hive安装配置(单机版)所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复