#cd training
#tar -zxvf apache-hive-2.1.1-bin.tar.gz
# rm -rf apache-hive-2.1.1-bin.tar.gz
# mv apache-hive-2.1.1-bin/ hive
#cd hive/conf
#vi /etc/profile
export HIVE_HOME=/root/training/hive
export PATH=$PATH:$HIVE_HOME/bin
#source /etc/profile
上传一个mysql-connector-java-5.1.44-bin.jar包到/hive/lib目录下
#vi hive-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://192.168.116.27:3306/hive</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>000000</value>
</property>
</configuration>
#hive
>quit;