Loading
0

Apache Hive安装

官网:https://hive.apache.org/

下载安装包:

wget https://dlcdn.apache.org/hive/hive-3.1.3/apache-hive-3.1.3-bin.tar.gz

配置环境变量:

vi ~/.bashrc

配置hive-site.xml:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
 <property>
    <name>hive.metastore.schema.verification</name>
    <value>false</value>
  </property>
  <property>
    <name>datanucleus.schema.autoCreateAll</name>
    <value>true</value>
  </property>
</configuration>

初始化元数据(在HOME_HIVE下运行):

schematool -dbType derby -initSchema --verbose

启动:

hive --service metastore 
hive --service hiveserver2

后台启动:

nohup bin/hive --service metastore >> logs/metastore.log 2>&1 &

参考:

最后编辑于:2023/12/7作者: joycode

我不入地狱,谁入地狱?

评论已关闭