Installation and use of hive

Source: Internet
Author: User

Java_home=/usr/local/jdk1.7.0_55
hadoop_home=/usr/local/hadoop-2.6.0
hive_home=/usr/local/hive-0.14.0

1. Linux below
Install MySQL Online
1°, view MySQL dependencies
Rpm-qa | grep MySQL
2°, delete MySQL dependency
Rpm-e--nodeps ' Rpm-qa | grep MySQL '
3°, yum install MySQL
Yum-y Install Mysql-server
4°, start MySQL service
Service mysqld Start
5°, join to boot startup item
Chkconfig mysqld on
6°, initialize configuration MySQL service
Whereis mysql_secure_installation
Execute Script/usr/bin/mysql_secure_installation
7°, Access MySQL service
Mysql-h Pc.study.crxy.cn-uroot-proot
Problem: Host ' node0 ' isn't allowed to connect to this MySQL server
Workaround:
Mysql> Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ';
Mysql>grant all privileges on * * to ' root ' @ ' localhost ' identified by ' 123456 ' with GRANT option;
mysql> flush Privileges;

2. Installing hive
The premise is that Hadoop must already be started * * *
1°, unpack the hive's installation package
[Email protected] local]# TAR-ZXVF apache-hive-0.14.0-bin.tar.gz-c. /
2°, backup configuration file
[email protected] conf]# CP hive-env.sh.template hive-env.sh
[email protected] conf]# CP hive-default.xml.template Hive-site.xml
3°, configuring the hive configuration file
1), modify hive-env.sh
Add three lines of content (everyone adds according to their own situation)
Java_home=/usr/local/jdk1.7.0_55
hadoop_home=/usr/local/hadoop-2.6.0
hive_home=/usr/local/hive-0.14.0
2), modify Hive-site.xml
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://node0:3306/my_hive?createDatabaseIfNotExist=true</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>hive</value>
</property>
<property>
<name>hive.querylog.location</name>
<value>/usr/local/hive-0.14.0/tmp</value>
</property>
<property>
<name>hive.exec.local.scratchdir</name>
<value>/usr/local/hive-0.14.0/tmp</value>
</property>
<property>
<name>hive.downloaded.resources.dir</name>
<value>/usr/local/hive-0.14.0/tmp</value>
</property>
4°, copy MySQL drive to $hive_home/lib directory
[Email protected] bin]# Cp/usr/local/soft/mysql-connector-java-5.1.17.jar. /lib/
5°, start hive
[Email protected] bin]#./hive <==> equivalent to
[Email protected] bin]#./hive--service CLI

Installation and use of hive

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.