栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

linux hive安装

linux hive安装

[root@mihaoyu151 install]# tar -zxf ./hive-1.1.0-cdh5.14.2.tar.gz -C /opt/soft/

[root@mihaoyu151 install]# cd ../soft

[root@mihaoyu151 soft]# mv hive-1.1.0-cdh5.14.2/ hive110

[root@mihaoyu151 soft]# vi /etc/profile
#hive
export HIVE_HOME=/opt/soft/hive110
export PATH=$PATH:$HIVE_HOME/bin

[root@mihaoyu151 soft]# source /etc/profile

[root@mihaoyu151 soft]# cd ./hive110/conf

[root@mihaoyu151 conf]# touch hive-site.xml

[root@mihaoyu151 conf]# vi ./hive-site.xml



  
    javax.jdo.option.ConnectionURL
    jdbc:mysql://192.168.133.151:3306/hive151?createDatabaseIfNotExist=true
  
  
    javax.jdo.option.ConnectionDriverName
    com.mysql.jdbc.Driver
  
  
    javax.jdo.option.ConnectionUserName
    root
  
  
    javax.jdo.option.ConnectionPassword
    root
   
  
    hive.server2.thrift.client.user
    root
  
  
    hive.server2.thrift.client.password
    root
  

拷贝mysql驱动包到hive110/lib文件中

[root@mihaoyu151 conf]# schematool -dbType mysql -initSchema
which: no hbase in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/opt/soft/jdk180/bin:/opt/soft/zookeeper345/bin:/opt/soft/hadoop260/sbin:/opt/soft/hadoop260/bin:/opt/soft/jdk180/bin:/opt/soft/hadoop260/sbin:/opt/soft/hadoop260/bin:/opt/soft/zookeeper345/bin:/opt/soft/hive110/bin)
21/11/09 09:37:57 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
21/11/09 09:37:57 WARN conf.HiveConf: HiveConf of name hive.server2.thrift.client.user does not exist
21/11/09 09:37:57 WARN conf.HiveConf: HiveConf of name hive.server2.thrift.client.password does not exist
metastore connection URL:	 jdbc:mysql://192.168.133.151:3306/hive151?createDatabaseIfNotExist=true
metastore Connection Driver :	 com.mysql.jdbc.Driver
metastore connection User:	 root
Starting metastore schema initialization to 1.1.0-cdh5.14.2
Initialization script hive-schema-1.1.0.mysql.sql
Initialization script completed
schemaTool completed

[root@mihaoyu151 conf]# mysql -uroot -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 8
Server version: 5.7.36 MySQL Community Server (GPL)

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| hive151            |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.00 sec)

mysql> exit;
Bye

[root@mihaoyu151 conf]# start-all.sh 
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
21/11/09 09:42:41 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [mihaoyu151]
mihaoyu151: starting namenode, logging to /opt/soft/hadoop260/logs/hadoop-root-namenode-mihaoyu151.out
mihaoyu151: starting datanode, logging to /opt/soft/hadoop260/logs/hadoop-root-datanode-mihaoyu151.out
Starting secondary namenodes [mihaoyu151]
mihaoyu151: starting secondarynamenode, logging to /opt/soft/hadoop260/logs/hadoop-root-secondarynamenode-mihaoyu151.out
21/11/09 09:42:58 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
starting yarn daemons
starting resourcemanager, logging to /opt/soft/hadoop260/logs/yarn-root-resourcemanager-mihaoyu151.out
mihaoyu151: starting nodemanager, logging to /opt/soft/hadoop260/logs/yarn-root-nodemanager-mihaoyu151.out

[root@mihaoyu151 conf]# hive
which: no hbase in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/opt/soft/jdk180/bin:/opt/soft/zookeeper345/bin:/opt/soft/hadoop260/sbin:/opt/soft/hadoop260/bin:/opt/soft/jdk180/bin:/opt/soft/hadoop260/sbin:/opt/soft/hadoop260/bin:/opt/soft/zookeeper345/bin:/opt/soft/hive110/bin)
21/11/09 09:43:18 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
21/11/09 09:43:18 WARN conf.HiveConf: HiveConf of name hive.server2.thrift.client.user does not exist
21/11/09 09:43:18 WARN conf.HiveConf: HiveConf of name hive.server2.thrift.client.password does not exist

Logging initialized using configuration in jar:file:/opt/soft/hive110/lib/hive-common-1.1.0-cdh5.14.2.jar!/hive-log4j.properties
WARNING: Hive CLI is deprecated and migration to Beeline is recommended.
hive> show databases;
OK
default
Time taken: 4.117 seconds, Fetched: 1 row(s)
hive> 
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/460658.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号