[root@master conf]# cp hive-env.sh.template hive-env.sh [root@master conf]# vim hive-env.sh #找到下面位置,做对应修改 # Set HADOOP_HOME to point to a specific hadoop install directory HADOOP_HOME=/app/servers/hadoop-2.7.7
# Hive Configuration Directory can be controlled by: export HIVE_CONF_DIR=/app/servers/hive-2.3.4/conf
# Folder containing extra libraries required for hive compilation/execution can be controlled by: # export HIVE_AUX_JARS_PATH= export JAVA_HOME=/app/servers/jdk1.8.0_191 export HIVE_HOME=/app/servers/hive-2.3.4:
[root@master ~]# mkdir /app/src/ [root@master ~]# cd /app/src/ [root@master src]# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm [root@master src]# rpm -ivh mysql-community-release-el7-5.noarch.rpm [root@master src]# yum install mysql-community-server 安装完成,重启服务 [root@master src]# service mysqld restart [root@master src]# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.6.51 MySQL Community Server (GPL) Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. 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> 安装成功
修改root口令
1 2 3 4 5 6 7 8 9 10
# 查找root密码 grep password /var/log/mysqld.log # 修改root口令 mysql -uroot -p # 设置口令强度 set global validate_password_policy=0; # 将root口令设置为12345678 set password for 'root'@'localhost' =password('12345678'); # 刷新 flush privileges;
validate_password_policy 密码策略(默认是1),可配置的值有以下:
0 or LOW 仅需需符合密码长度(由参数validate_password_length【默认为 8】指定)
1 or MEDIUM 满足LOW策略,同时还需满足至少有1个数字,小写字母,大写字母和特殊字符
2 or STRONG 满足MEDIUM策略,同时密码不能存在字典文件(dictionary file)中
创建hive用户
1 2 3 4 5
CREATE USER 'hive'@'%' IDENTIFIED BY '12345678'; -- 授权 GRANT ALL ON *.* TO 'hive'@'%'; -- 刷新 FLUSH PRIVILEGES;
初始化
1
[root@master src]# schematool -dbType mysql -initSchema