码迷,mamicode.com
首页 > 其他好文 > 详细

hive 安装

时间:2015-01-20 20:07:54      阅读:250      评论:0      收藏:0      [点我收藏+]

标签:

参照:http://www.cloudera.com/content/cloudera/en/documentation/cloudera-manager/v5-0-0/Cloudera-Manager-Installation-Guide/cm5ig_mysql.html#cmig_topic_5_5


1 安装mysql server (only one host)

sudo yum install mysql-server


2 停止mysql server的运行 (only one host)

sudo service mysqld stop


3 配置mysql server (only one host)

vim /etc/my.cnf


内容如下:

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

user=mysql

port=3300


transaction-isolation=READ-COMMITTED

max_connections=550


# Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0


[mysqld_safe]

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid


#InnoDB settings

innodb_file_per_table = 1

innodb_flush_log_at_trx_commit = 2

innodb_log_buffer_size = 64M

innodb_buffer_pool_size = 4G

innodb_thread_concurrency = 8

innodb_flush_method = O_DIRECT

innodb_log_file_size = 512M


4 确保mysql服务在服务器开机启动时,就会被启动 (only one host)

sudo /sbin/chkconfig mysqld on

sudo /sbin/chkconfig --list mysqld

 

5 启动mysql服务 (only one host)

sudo service mysqld start
6 设置mysql
root的密码 (only one host)
如下:红色文字为需要输入的。
sudo /usr/bin/mysql_secure_installation
[...]
Enter current password for root (enter for none):
OK,
successfully used password, moving on...
[...]
Set root password? [Y/n] y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] Y
[...]
Disallow root login remotely? [Y/n] N
[...]
Remove test database and access to it [Y/n] Y
[...]
Reload privilege tables now? [Y/n] Y
All done!
7 安装mysql JDBC Connector
CM服务的主机以及activity
monitor,reports manager,cloudera navigator以及Hive
Metastore server对应的主机上安装mysql
JDBC Connector
sudo yum install mysql-connector-java
8 hive metastore创建数据库

     Log into MySQL as the root user:

$mysql -u root -p
Enter password:
mysql>create database metastore DEFAULT CHARACTER SET utf8;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on metastore.* TO ‘hive‘@‘%‘ IDENTIFIED BY ‘password‘;
Query OK, 0 rows affected (0.00 sec)

9 使用CM安装hive

技术分享



hive 安装

标签:

原文地址:http://www.cnblogs.com/syx-1987/p/4236768.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!