在hive官网下载最新的tar包,当前最新包为apache-hive-0.14.0-bin.tar.gz。
假定安装路径为/opt/hive:
sudo mv apache-hive-0.14.0-bin.tar.gz /opt
sudo tar xvf apache-hive-0.14.0-bin.tar.gz
sudo ln -s apache-hive-0.14.0-bin hive
sudo mv mysql-connector-java-5.1.25.jar /opt/hive/lib
sudo rename 's/\.template//' *
sudo touch hive-site.xml
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/metastore?createDatabaseIfNotExist=true</value>
<description>the URL of the MySQL database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hive</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>HIVE_DBPASS</value>
</property>
<property>
<name>datanucleus.autoCreateSchema</name>
<value>true</value>
</property>
<property>
<name>datanucleus.fixedDatastore</name>
<value>false</value>
</property>
<property>
<name>datanucleus.autoCreateTables</name>
<value>true</value>
</property>
<property>
<name>datanucleus.autoCreateColumns</name>
<value>true</value>
</property>
<property>
<name>datanucleus.autoStartMechanism</name>
<value>SchemaTable</value>
</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/user/hive/warehouse</value>
</property>
<!--
<property>
<name>hive.metastore.uris</name>
<value>thrift://localhost:9083</value>
<description>IP address (or fully-qualified domain name) and port of the metastore host</description>
</property>
<property>
<name>hive.aux.jars.path</name>
<value>file:///opt/hive/lib/zookeeper-3.4.5.jar,file:///opt/hive/lib/hive-hbase-handler-0.14.0.jar,file:///opt/hive/lib/guava-11.0.2.jar</value>
</property>
-->
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
<property>
<name>hive.support.concurrency</name>
<description>Enable Hive's Table Lock Manager Service</description>
<value>true</value>
</property>
</configuration>
$HADOOP_HOME/bin/hdfs dfs -mkdir /tmp
$HADOOP_HOME/bin/hdfs dfs -mkdir /user/hive
$HADOOP_HOME/bin/hdfs dfs -chown hive /user/hive
$HADOOP_HOME/bin/hdfs dfs -mkdir /user/hive/warehouse
$HADOOP_HOME/bin/hdfs dfs -chmod g+w /tmp
$HADOOP_HOME/bin/hdfs dfs -chmod 777 /user/hive/warehouse
$HADOOP_HOME/bin/hdfs dfs -chmod a+t /user/hive/warehouse
2024年6月06日 09:39
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own Blog Engine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.
2024年9月07日 01:33
It has really well-researched stuff and superb writing. I became engrossed in the content so quickly that I couldn't wait to read it. I'm in awe of your talent and labor. Regards. Indijski uvjeti za e vizu Češki državljani
2024年10月23日 21:29
More readers would be interested in the works of authors if more of them took the time to create excellent material, as you do. I've gained much too much knowledge from your post. turkey visa eligibility burkina faso citizensMore readers would be interested in the works of authors if more of them took the time to create excellent material, as you do. I've gained much too much knowledge from your post. turkey visa eligibility burkina faso citizens
2024年12月04日 04:32
Excellent work! I want everyone to be aware of how excellent the information in your piece is. In regards to this matter, your opinions and mine are very similar. I know, so I'll check out your blog every day. For me, that may be really advantageous. turkey visa eligibility comorian citizens
2025年1月05日 23:01
This is so creative and inspiring easter bunny for rent
2025年1月08日 06:04
Excellent work! I want everyone to be aware of how excellent the information in your piece is. In regards to this matter, your opinions and mine are very similar. I know, so I'll check out your blog every day. For me, that may be really advantageous. indiska e visumberättigande nederländska medborgare
Excellent work! I want everyone to be aware of how excellent the information in your piece is. In regards to this matter, your opinions and mine are very similar. I know, so I'll check out your blog every day. For me, that may be really advantageous. indiska e visumberättigande nederländska medborgare