手把手教你在腾讯云上搭建hive3.1.2

环境准备

所有操作开始前,先确定hadoop版本已经装好。具体可以看我的另一篇博客
搭建hadoop3.x

mysql安装

先把安装包放到software文件夹,并解压到mysql-lib中

[root@master software]# ll
总用量 1422372
-rw-r--r-- 1 root root 312850286 7月   2 15:00 apache-hive-3.1.2-bin.tar.gz
-rw-r--r-- 1 root root 338075860 7月   2 09:39 hadoop-3.1.3.tar.gz
-rw-r--r-- 1 root root 195013152 7月   2 09:36 jdk-8u212-linux-x64.tar.gz
-rw-r--r-- 1 root root 609556480 7月   2 15:08 mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar
-rw-r--r-- 1 root root    985600 7月   2 14:44 mysql-connector-java-5.1.37.jar
[root@master software]# mkdir mysql-lib
[root@master software]# tar -xf mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar -C ./mysql-lib/
[root@master software]# cd mysql-lib/
[root@master mysql-lib]# ll
总用量 595272
-rw-r--r-- 1 7155 31415  45109364 9月  30 2019 mysql-community-client-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415    318768 9月  30 2019 mysql-community-common-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415   7037096 9月  30 2019 mysql-community-devel-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415  49329100 9月  30 2019 mysql-community-embedded-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415  23354908 9月  30 2019 mysql-community-embedded-compat-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 136837816 9月  30 2019 mysql-community-embedded-devel-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415   4374364 9月  30 2019 mysql-community-libs-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415   1353312 9月  30 2019 mysql-community-libs-compat-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 208694824 9月  30 2019 mysql-community-server-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 133129992 9月  30 2019 mysql-community-test-5.7.28-1.el7.x86_64.rpm

先处理一下环境,因为centos自带mariadb,会产生冲突,所以要先卸载

[root@master mysql-lib]# rpm -qa|grep mariadb
mariadb-libs-5.5.56-2.el7.x86_64
[root@master mysql-lib]# sudo rpm -e --nodeps mariadb-libs 
# 查看一下是不是卸载干净了
[root@master mysql-lib]# rpm -qa|grep mariadb
[root@master mysql-lib]# rpm -qa|grep mysql

没什么问题了就可以安装了,一定要按顺序安装

[root@master mysql-lib]# ll
总用量 595284
-rw-r--r-- 1 7155 31415  45109364 9月  30 2019 mysql-community-client-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415    318768 9月  30 2019 mysql-community-common-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415   7037096 9月  30 2019 mysql-community-devel-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415  49329100 9月  30 2019 mysql-community-embedded-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415  23354908 9月  30 2019 mysql-community-embedded-compat-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 136837816 9月  30 2019 mysql-community-embedded-devel-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415   4374364 9月  30 2019 mysql-community-libs-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415   1353312 9月  30 2019 mysql-community-libs-compat-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 208694824 9月  30 2019 mysql-community-server-5.7.28-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 133129992 9月  30 2019 mysql-community-test-5.7.28-1.el7.x86_64.rpm
[root@master mysql-lib]# sudo rpm -ivh mysql-community-common-5.7.28-1.el7.x86_64.rpm
警告:mysql-community-common-5.7.28-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-common-5.7.28-1.e################################# [100%]
[root@master mysql-lib]# sudo rpm -ivh mysql-community-libs-5.7.28-1.el7.x86_64.rpm
警告:mysql-community-libs-5.7.28-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-libs-5.7.28-1.el7################################# [100%]
[root@master mysql-lib]# sudo rpm -ivh mysql-community-libs-compat-5.7.28-1.el7.x86_64.rpm
警告:mysql-community-libs-compat-5.7.28-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-libs-compat-5.7.2################################# [100%]
[root@master mysql-lib]# sudo rpm -ivh mysql-community-client-5.7.28-1.el7.x86_64.rpm
警告:mysql-community-client-5.7.28-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-client-5.7.28-1.e################################# [100%]

安装到第5个时,如果centos是最小化安装的,那会报这个问题

[root@master mysql-lib]# sudo rpm -ivh mysql-community-server-5.7.28-1.el7.x86_64.rpm
警告:mysql-community-server-5.7.28-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
错误:依赖检测失败:
        libnuma.so.1()(64bit) 被 mysql-community-server-5.7.28-1.el7.x86_64 需要
        libnuma.so.1(libnuma_1.1)(64bit) 被 mysql-community-server-5.7.28-1.el7.x86_64 需要
        libnuma.so.1(libnuma_1.2)(64bit) 被 mysql-community-server-5.7.28-1.el7.x86_64 需要
[root@master mysql-lib]# yum install -y libaio
[root@master mysql-lib]# yum install -y numactl

然后再尝试安装就没问题了

[root@master mysql-lib]# sudo rpm -ivh mysql-community-server-5.7.28-1.el7.x86_64.rpm
警告:mysql-community-server-5.7.28-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-server-5.7.28-1.e################################# [100%]

清理历史残余文件

[root@master mysql-lib]# cat /etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on 
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值