0
点赞
收藏
分享

微信扫一扫

Linux安装单体Hive demo*

准备hive tar.gz包

上传到指定目录下

直接rz 命令上传,其它上传工具也行

Linux安装单体Hive demo*_hive

解压

tar -zxvf apache-hive-1.2.1-bin.tar.gz

解压完毕

配置环境变量

改个名字

[root@zjj101 soft]# mv apache-hive-1.2.1-bin  hive-1.2.1
[root@zjj101 soft]# ls
apache-hive-1.2.1-bin.tar.gz hadoop-2.7.2 hadoop-2.7.2.tar.gz hello.txt hive-1.2.1 myconf mysql tmp

记录hive安装位置为

/root/soft/hive-1.2.1

[root@zjj101 soft]# cd hive-1.2.1/
[root@zjj101 hive-1.2.1]# ls
bin conf examples hcatalog lib LICENSE NOTICE README.txt RELEASE_NOTES.txt scripts
[root@zjj101 hive-1.2.1]# pwd
/root/soft/hive-1.2.1
[root@zjj101 hive-1.2.1]#

配置环境变量

直接 sudo vim /etc/profile 编辑也行
我使用notepad++连接

直接配置环境变量

前提是jdk和hadoop 环境变量已经配置过了.

Linux安装单体Hive demo*_hive_02

配置完了保存刷新配置文件

# 刷新配置文件
# 输入命令:

[root@zjj101 hive-1.2.1]# source /etc/profile

# 尝试一下hive是否安装成功
[root@zjj101 hive-1.2.1]# hive

Linux安装单体Hive demo*_hive_03

错误问题

Call From zjj101/172.16.10.101 to zjj101:9000 failed on connection exception: java.net.ConnectException: 拒绝连接; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

这个原因是namenode 和DataNode没有启动, 9000是我机器hdfs的的端口,

Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.SafeModeException): Cannot create directory /tmp/hive. Name node is in safe mode.

The reported blocks 20 has reached the threshold 0.9990 of total blocks 20. The number of live datanodes 1 has reached the minimum number 0. In safe mode extension. Safe mode will be turned off automatically in 10 seconds.

意思是处于安全模式

hdfs没有关闭安全模式,直接强制离开安全模式就行了:
命令:
hdfs dfsadmin -safemode leave


举报

相关推荐

0 条评论