Installation Configuration on Ubuntu Hive

Hive Installation and Configuration

Hive's official website address http://hive.apache.org/

Download http://archive.apache.org/dist/hive/

I downloaded the apache-hive-1.2.1-bin.tar.gz, tutorial paper also carried out according to this version

1. apache-hive-1.2.1-bin.tar.gz to extract the / opt / module / directory

sudo tar -zxvf ~/resource/apache-hive-1.2.1-bin.tar.gz -C /opt/module

2. Modify apache-hive-1.2.1-bin.tar.gz name for the hive (after easy to find and operate)

cd /opt/module

Music Videos-Apache-Hive the sudo 1.2.1-bin / Hive
3. Modify / opt / module / hive / hive -env.sh.template conf directory name is hive-env.sh

hadoop@ubuntu:/opt/module$ cd /opt/module/hive/conf
hadoop@ubuntu:/opt/module/hive/conf$ sudo  mv hive-env.sh.template hive-env.sh

 

 

 4. Configure hive-env.sh file

hadoop@ubuntu:/opt/module/hive/conf$ sudo vim hive-env.sh

Add the code below:

export HADOOP_HOME = / usr / local / hadoop # hadoop your path

export HIVE_CONF_DIR=/opt/module/hive/conf

Hive Hadoop cluster configuration

1. First you must start hdfs and yarn

./sbin/start-dfs.sh

./sbin/start-yarn.sh

2. Create / tmp and / user / hive / warehouse two directories on HDFS and modify their same group permissions can write

hadoop@ubuntu:/usr/local/hadoop$ ./bin/hdfs dfs -mkdir /tmp
hadoop@ubuntu:/usr/local/hadoop$ ./bin/hdfs dfs -mkdir -p /user/hive/warehouse


hadoop@ubuntu:/usr/local/hadoop$ ./bin/hdfs dfs -chmod g+w /tmp
hadoop@ubuntu:/usr/local/hadoop$ ./bin/hdfs dfs -chmod g+w /user/hive/warehouse

Guess you like

Origin www.cnblogs.com/lovema1210/p/11458868.html
Recommended