HIVE1.2.1配置

文章目录

        • HIVE1.2.1配置
          • hive配置
          • 在hdfs建立hive仓库目录
          • 启动单例hive
          • 测试
          • 配置 mysql5.6
          • 编辑hive-site.xml使用MySQL做元数据管理

HIVE1.2.1配置
hive配置

cp /opt/module/apache-hive-1.2.1-bin/hive-env.sh.template /opt/module/apache-hive-1.2.1-bin/hive-env.sh

vim cp /opt/module/apache-hive-1.2.1-bin/hive-env.sh
export HADOOP_HOME=/opt/module/hadoop-2.7.7
export HIVE_CONF_DIR=/opt/module/apache-hive-1.2.1-bin/conf
在hdfs建立hive仓库目录

hadoop fs -mkdir /tmp
hadoop fs -mkdir -p /user/hive/warehouse

启动单例hive

/opt/module/apache-hive-1.2.1-bin/bin/hive

测试
create table student(id int ,name string);
show tables;

insert into table student values(1,'zs');
配置 mysql5.6
#进入MySQL,设置初始密码,括号内就是密码,可以根据你的需要进行设置
set password = password('000000');

#开启root用户的远程登录权限 和远程登录密码(就是这里的000000)
grant all privileges on *.* to 'root'@'%' identified by '000000' with grant option;
flush privileges;

select Host, user from user;
编辑hive-site.xml使用MySQL做元数据管理



    
        javax.jdo.option.ConnectionURL
        jdbc:mysql://node01:3306/metastore?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
        
        000000
        password to use against metastore database
    

你可能感兴趣的:(数据仓库,hive,hadoop,big,data)