Apache Hive安装

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

下载安装包:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
wget https://dlcdn.apache.org/hive/hive-3.1.3/apache-hive-3.1.3-bin.tar.gz
wget https://dlcdn.apache.org/hive/hive-3.1.3/apache-hive-3.1.3-bin.tar.gz
wget https://dlcdn.apache.org/hive/hive-3.1.3/apache-hive-3.1.3-bin.tar.gz

配置环境变量:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
vi ~/.bashrc
vi ~/.bashrc
vi ~/.bashrc

配置hive-site.xml:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<?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>
<?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>
<?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下运行):

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
schematool -dbType derby -initSchema --verbose
schematool -dbType derby -initSchema --verbose
schematool -dbType derby -initSchema --verbose

启动:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
hive --service metastore
hive --service hiveserver2
hive --service metastore hive --service hiveserver2
hive --service metastore 
hive --service hiveserver2

后台启动:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
nohup bin/hive --service metastore >> logs/metastore.log 2>&1 &
nohup bin/hive --service metastore >> logs/metastore.log 2>&1 &
nohup bin/hive --service metastore >> logs/metastore.log 2>&1 &

参考:

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享