Hive2.1.1, Hadoop2.7.3 Deployment

Source: Internet
Author: User

This article installs Hive2.1.1 in remote mode to place hive metadata in the MySQL database.

1 Installing the MySQL database

sudo apt-get install mysql-server
     
     
      
      1
     
     
     
     
      
      1
     
     


Restarting the MySQL service makes the configuration file effective

sudo service mysql restart
     
     
      
      1
     
     
     
     
      
      1
     
     

Create a hive dedicated account

CREATE USER ' hive ' @ '% ' identified by ' 123456 ';
     
     
      
      1
     
     
     
     
      
      1
     
     

Grant all permissions to the hive account

Grant all privileges on * * to ' hive ' @ '% ' identified by ' 123456 ' with GRANT option;
     
     
      
      1
     
     
     
     
      
      1
     
     

Refresh the System permissions table for the configuration to take effect

Flush privileges;
     
     
      
      1
     
     
     
     
      
      1
     
     

2 Unpacking and Installing hive

Cd/usr/local
sudo tar-xvzf apache-hive-2.1.1-bin.tar.gz
sudo mv apache-hive-2.1.1-bin/hive-2.1.1
     
     
      
      1
      
      2
      
      3
     
     
     
     
      
      1)
      
      2
      
      3
     
     

Configuring System Environment Variables

sudo gedit. BASHRC
export hive_home=/usr/local/hive-2.1.1
exportpath= $HIVE _home/bin: $HIVE _home/lib: $PATH
     
     
      
      1
      
      2
      
      3
     
     
     
     
      
      1
      
      2
      
      3
     
     


Make environment variable configuration effective

source. BASHRC
     
     
      
      1
     
     
     
     
      
      1
     
     

3 Configuring Hive
3.1 Modify conf/hive-env.sh File

cd/usr/local/hive-2.1.1/conf/
sudo cp hive-env.sh.template hive-env.sh
sudo chown hadoop:hadoop hive-env.sh
sudo vi hive-env.sh
hadoop_home=/usr/local/hadoop-2.7.3
export hive_conf_dir=/usr/local/hive-2.1.1/conf
export HIVE_AUX_JARS _path=/usr/local/hive-2.1.1/lib
     
     
      
      1
      
      2
      
      3
      
      4
      
      5
      
      6
      
      7
     
     
     
     
      
      1
      
      2
      
      3
      
      4
      
      5
      
      6
      
      7
     
     


3.2 Modify Log Properties file configuration Log Store directory
Modify Hive-log4j2.properties

sudo cp hive-log4j2.properties.template hive-log4j2.properties
sudo chown hadoop:hadoop hive-log4j2.properties
sudo  vi hive-log4j2.properties
property.hive.log.dir =/usr/local/hive-2.1.1/logs
     
     
      
      1
      
      2
      
      3
      
      4
     
     
     
     
      
      1
      
      2)
      
      3
      
      4
     
     

Modify Llap-cli-log4j2.properties

Property.hive.log.dir =/usr/local/hive-2.1.1/logs
property.hive.log.file = llap-cli.log
     
     
      
      1
      
      2
     
     
     
     
      
      1
      
      2
     
     

3.3 Modify the Hive-site.xml configuration file, mainly modify the following configuration items

  <property>
    <name>hive.exec.local.scratchdir</name>
    

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.