标签:https tar mirror nucleus nload .gz port echo driver
安装mysql-server
apt-get install mysql-server
下载hive
sudo wget http://mirrors.hust.edu.cn/apache/hive/hive-2.3.0/apache-hive-2.3.0-bin.tar.gz
解压hive
sudo tar zxvf apache-hive-2.3.0-bin.tar.gz
sudo mv apache-hive-2.3.0-bin.tar.gz /opt/hive
环境变量
sudo vim /etc/profile.d/hive-en.sh
export HIVE_HOME=/opt/hive
export HCAT_HOME=$HIVE_HOME/hcatalog
export HIVE_CONF=$HIVE_HOME/conf
export PATH=$PATH:$HIVE_HOME/bin
source /etc/profile.d/hive-en.sh
echo $HIVE-HOME
hive配置
cd /opt/hive/conf/
配置hive.site.xml
cp hive-default.xml.template hive.site.xml
sudo gedit hive-site.xml
配置:
<name>javax.jdo.option.ConnectionPassword</name>
<value>root</value>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<name>hive.metastore.schema.verification</name>
<value>false</value>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
下面几个配置没有的复制到倒数第二行:
<property>
<name>datanucleus.schema.autoCreateSchema</name>
<value>true</value>
</property>
<property>
<name>datanucleus.schema.autoCreateSchema</name>
<value>true</value>
</property>
<property>
<name>datanucleus.schema.autoCreateTables</name>
<value>true</value>
</property>
<property>
<name>datanucleus.schema.autoCreateColumns</name>
<value>true</value>
</property>
将${system:java.io.tmpdir}替换/tmp
将${system:user.name}替换root
检查jdbc包
cd /opt/hive/lib
https://dev.mysql.com/downloads/connector/j/
下载解压拷贝到
创建hive数据库
hive
show tables;
gedit /tmp/donny/hive.log 查看异常
mysql查看
新开窗口
mysql -uroot -p
show databases;
Ubuntu16.04 install apache-hive-2.3.0-bin.tar.gz
标签:https tar mirror nucleus nload .gz port echo driver
原文地址:http://www.cnblogs.com/DowneyJr/p/7635053.html