环境准备
所有操作开始前,先确定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是最小化安装的,那会报这个问题
手把手教你在腾讯云上搭建hive3.1.2的方法
扫一扫手机访问
