标签:create mic init class 下载地址 href site config 解压
下载地址:http://mirror.bit.edu.cn/apache/hive/
tar -zxvf /usr/localhost/apache-hive-2.3.6-bin.tar.gz
mv apache-hive-2.3.6-bin/ hive
vim /etc/profile
export HIVE_HOME=/opt/module/hive
export PATH=$PATH:$HIVE_HOME/bin
source /etc/profile
hive --version
cd /opt/module/hive/conf/
vi hive-site.xml
<configuration>
<property><!--数据库用户名-->
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property><!--数据块密码-->
<name>javax.jdo.option.ConnectionPassword</name>
<value>root</value>
</property>
<property><!--连接字符串-->
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://127.0.0.1:3306/hive?createDatabaseIfNotExist=true</value>
</property>
<property><!--驱动类-->
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<!--关闭数据库的版本检查-->
<name>hive.metastore.schema.verification</name>
<value>false</value>
</property>
</configuration>
cd /opt/module/hive/lib/
cd /opt/module/hive/bin
schematool -dbType mysql -initSchema
hadoop fs -ls -r /
hive
create database hive_01;
use hive_01;
create table hive_01(id int,name String);
标签:create mic init class 下载地址 href site config 解压
原文地址:https://www.cnblogs.com/wnwn/p/12736341.html