安装hive
1、下载压缩包到指定路径:cd /home/bduser/data/hive/
解压缩 tar -xzvf 改名为hive
2、上传mysql-connector到data的mysql-connect下
3、配置环境变量 sudo vim /etc/profile
source /etc/profile
4、cp /home/bduser/data/mysql-connect/mysql-connector-java-5.XXXXXXXXX.jar /home/bduser/data/hive/hive/lib/
5、到hive/conf 目录下 touch hive-site.xml
<configuration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://hadoop:3306/hive?createDatabaseIfNotExist=true&useSSL=false</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jd