hive(1.2.1)安装

一、点击下载hive

二、解压

tar -zxvf apache-hive-1.2.1-bin.tar.gz

三、创建软连接

ln -s apache-hive-1.2.1-bin hive

四、配置环境变量

vi ~/.bashrc
HIVE_HOME=/home/sweeney/soft/hive

五、安装MySQL数据库(不安装MySQL数据库的话,hive默认使用内置的Derby SQL服务器存储表的模式信息和其它元数据信息

六、修改在conf目录下新建一个hive-site.xml文件,添加以下信息:




    
            hive.exec.local.scratchdir
            /home/sweeney/hive
    

    
            javax.jdo.option.ConnectionUserName
            hive
            
    
    
            javax.jdo.option.ConnectionPassword
            123456
            
    

    
            javax.jdo.option.ConnectionURL
            jdbc:mysql://master:3306/hive?   createDatabaseIfNotExist=true&useSSL=false
            
    
    
            javax.jdo.option.ConnectionDriverName
            com.mysql.jdbc.Driver
            
    

    
            hive.metastore.warehouse.dir
            /user/hive/warehouse
            
    

七、启动hadoop集群

start-dfs.sh
start-yarn.sh

八、进入hive数据库

hive

 

你可能感兴趣的:(hive(1.2.1)安装)