Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install hive-1.1.0-cdh5.4.0

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to install hive-1.1.0-cdh5.4.0, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Install jdk:

Source ~ / .bash_profile [recommended in the current user's environment variable configuration]

Install hadoop

According to the configuration file of hadoop2.6. Create the / user/hive/warehouse directory and give write permission.

Install mysql:

Http://blog.csdn.net/mecho/article/details/38414155

1. Check whether MySQL is installed on the system.

Use the command:

# rpm-qa | grep mysql

2. Uninstall the installed MySQL

The command to uninstall mysql is as follows:

# rpm-e-nodeps mysql-libs-5.1.61-4.el6.x86_64

To delete all files under the / var/lib/mysql folder

3. Install the new MySQL

The command is as follows:

# rpm-ivh MySQL-server-5.5.30-1.el6.x86_64.rpm

# rpm-ivh MySQL-client-5.5.30-1.el6.x86_64.rpm

# rpm-ivh MySQL-devel-5.5.30-1.el6.x86_64.rpm

4. Start the MySQL service

Method 1: restart the system

Method 2: # service mysql start

How to view the running status of MySQL:

Use the command: # / etc/rc.d/init.d/mysql status

Result: if "SUCCESS" is displayed, it is already running

Displays "FAILED" but does not run

MySQL service some other commands

A. Check whether mysql is automatically starting the list: # / sbin/chkconfig-list

B. Add mysql to the system self-starting service group: # / sbin/chkconfig-add mysql

C. Delete mysql from the startup service group: # / sbin/chkconfig-del mysql

D. Stop mysql service: # service mysql stop

E. Script to start mysql service: # / etc/rc.d/init.d/mysqld start

F. Script to stop mysql service: # / etc/rc.d/init.d/mysqld stop

5. Set the root password for MySQL after installation.

The command is as follows:

# mysql-u root-p

You will be prompted for a password, and the initial root password is saved in the'/ root/.mysql_secret' file

Then enter mysql > SET PASSWORD = PASSWORD ('123456')

6. Mysql installation directory description

/ var/lib/mysql database file

/ usr/share/mysql commands and configuration files

/ usr/bin (mysqladmin, mysqldump, etc.)

7. The mysql table names installed under linux are case-sensitive. If you want to be case-insensitive, you can use the following methods

1. Copy / usr/share/mysql/my-huge.cnf to / etc/my.cnf (if you already have the file, you can modify it directly)

The command is as follows: # cp / usr/share/mysql/my-huge.cnf / etc/my.cnf

2. Modify my.cnf file

Add under [mysqld]

Lower_case_table_names=1 # table names are all lowercase to avoid case sensitivity

3. Restart mysql

# service mysql restart

Http://f.dataguru.cn/thread-498990-1-1.html

8 (optional), assign permissions to hosts connected to the MySQL:

The command is as follows:

Mysql > GRANT ALL PRIVILEGES ON *. * TO 'root'@'hdfs-spark-1'IDENTIFIED BY' 123456 'WITH GRANT OPTION

> mysql GRANT SELECT,INSERT,UPDATE,DELETE ON *. * TO root@xxx.xxx.x.xx identified by '123456; / / xxx.xxx.x.xx is your IP

/ usr/bin/mysqladmin-u root password 'mysql' / / set the password mysql-u root-p for the root account

GRANT ALL PRIVILEGES ON *. * TO 'root'@'%'IDENTIFIED BY' mysql' WITH GRANT OPTION

FLUSH PRIVILEGES

Create user hive identified by 'hive'

GRANT ALL PRIVILEGES ON hive.* TO 'hive'@'%' IDENTIFIEDBY' hive' WITH GRANT OPTION

FLUSH PRIVILEGES

GRANT ALL PRIVILEGES ON hive.* TO 'hive'@'localhost'IDENTIFIED BY' hive' WITH GRANT OPTION

FLUSH PRIVILEGES

GRANT ALL PRIVILEGES ON hive.* TO 'hive'@'node1'IDENTIFIED BY' hive' WITH GRANT OPTION

FLUSH PRIVILEGES

9. Boot and start MySQL

Log in to the terminal with a root user

Check to see if MySQL services are already available

# chkconfig-list

If there is no MySQL (if so, please ignore this step)

# chkconfig-add mysql

Set the boot to start the mysql service

# chkconfig mysql on

10 (optional), change the MySQL default character set (the default character set is the same as the operating system character set, so no setting is required)

View the mysql character set: mysql > show variables like 'character_set_%'

Http://czhwin.iteye.com/blog/1855549

Decompress hive

Copy MySQL-devel-5.6.20-1.el6.x86_64.rpm to $HIVE_HOME/lib

Change the configuration file for hive-site.xml

Javax.jdo.option.ConnectionURL

Jdbc:mysql://hdfs-hive:3306/hive?createDatabaseIfNotExist=true

JDBC connect string for a JDBC metastore

Javax.jdo.option.ConnectionDriverName

Com.mysql.jdbc.Driver

Driver class name for a JDBC metastore

Javax.jdo.option.ConnectionUserName

Root

Username to use against metastore database

Javax.jdo.option.ConnectionPassword

123456

Password to use against metastore database

Hive.cli.print.current.db

True

Show database db name

Hive.cli.print.current.header

True

Show database table head name

Hive.metastore.warehouse.dir

/ user/hive/warehouse

Show database table head name

Start hive

It is recommended to start using beeline.

Thank you for reading this article carefully. I hope the article "how to install hive-1.1.0-cdh5.4.0" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report