Hive安装
博客专区 > Bingo许 的博客 > 博客详情
Hive安装
Bingo许 发表于3个月前
Hive安装
  • 发表于 3个月前
  • 阅读 4
  • 收藏 0
  • 点赞 0
  • 评论 0

腾讯云 十分钟定制你的第一个小程序>>>   

在hadoop用户下安装hive

1.设置环境变量

vim ~/.bashrc
export HIVE_HOME=/home/hdpsrc/hive
export PATH=$PATH:$HIVE_HOME/bin
source .bash_profile

2.修改配置文件

hive-site.xml

cp hive/conf/hive-default.xml.template hive/conf/hive-site.xml
<property> 
   <name>javax.jdo.option.ConnectionURL </name> 
   <value>jdbc:mysql://192.168.0.0:3306/hive </value> 
</property> 
 
<property> 
   <name>javax.jdo.option.ConnectionDriverName </name> 
   <value>com.mysql.jdbc.Driver </value> 
</property>

<property> 
   <name>javax.jdo.option.ConnectionPassword </name> 
   <value>hive </value> 
</property> 

<property> 
   <name>hive.exec.scratchdir </name> 
   <value>hdfs://172.16.1.2:9000/tmp </value> 
</property>

<property> 
   <name>hive.metastore.warehouse.dir</name> 
   <value>hdfs://172.16.1.2:9000/user/hive/warehouse</value> 
</property> 
 
<property> 
   <name>hive.hwi.listen.port </name> 
   <value>9999 </value> 
   <description>This is the port the Hive Web Interface will listen on </descript ion> 
</property> 

<property> 
   <name>datanucleus.autoCreateSchema </name> 
   <value>true</value> 
</property> 
 
<property> 
   <name>datanucleus.fixedDatastore </name> 
   <value>false</value> 
</property> 
</property> 

  <property>
    <name>javax.jdo.option.ConnectionUserName</name>
    <value>hive</value>
    <description>Username to use against metastore database</description>
  </property>

  <property>
    <name>hive.exec.local.scratchdir</name>
    <value>/home/hive/iotmp</value>
    <description>Local scratch space for Hive jobs</description>
  </property>
  <property>
    <name>hive.downloaded.resources.dir</name>
    <value>/home/hive/iotmp</value>
    <description>Temporary local directory for added resources in the remote file system.</description>
  </property>
  <property>
    <name>hive.querylog.location</name>
    <value>/home/hive/iotmp</value>
    <description>Location of Hive run time structured log file</description>
  </property>

3.

mv /home/hadoop/Desktop/mysql-connector-java-5.1.6-bin.jar /home/hive/lib/

4.

mkdir /home/hive/iotmp

5.启动hive,测试

/home/hive/bin

hive

show databases;

 

共有 人打赏支持
粉丝 3
博文 18
码字总数 28863
×
Bingo许
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: