hive安装

1.安装mysql
2.解压hive:tar -zxf apache-hive-2.2.0-bin.tar.gz /apps 
  重命名:mv apache-hive-2.2.0 hive
3.将mysql-connetct-java.jar 拷贝到 hive/lib下
4.配置hive-site.xml:vi hive-site.xml


javax.jdo.option.ConnectionURL
jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true
JDBC connect string for a JDBC metastore


javax.jdo.option.ConnectionDriverName
com.mysql.jdbc.Driver
Driver class name for a JDBC metastore


javax.jdo.option.ConnectionUserName
root
username to use against metastore database


javax.jdo.option.ConnectionPassword
123456
password to use against metastore database


5.登录mysql:mysql -u root -p 执行一下语句:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
FLUSH PRIVILEGES;
6.初始化hive元数据库
bin/schematool -dbType mysql -initSchema
7.启动hive
bin/hive

你可能感兴趣的:(大数据)