首页 > 代码库 > how to install hive

how to install hive

1. download hive1.2.1 to /usr/local----------------->     apache-hive-1.2.1-bin.tar.gz

2. tar zxvf apache-hive-1.2.1-bin.tar.gz ---------->then there will be a directory apache-hive-1.2.1-bin

3. set envionmetal variable HIVE_HOME to this dir---->$HIVE_HOME =   /usr/local/apache-hive-1.2.1-bin/bin

4. create directory for hive on hdfs 

$ hdfs dfs -mkdir       /tmp
$ hdfs dfs -mkdir /user/hive/ $ hdfs
dfs -mkdir /user/hive/warehouse $ hdfs dfs -chmod g+w /tmp $ hdfs dfs -chmod g+w /user/hive
$ hdfs dfs -chmod g+w /user/hive/warehouse

 

how to install hive