Hive的安裝部署

mx739150發表於2013-12-18
1.安裝mysql
rpm -ivh MySQL-server-community-6.0.11-0.rhel5.i386.rpm
rpm -ivh MySQL-client-community-6.0.11-0.rhel5.i386.rpm
2.啟動mysql服務
/sbin/service mysql start
3.登陸mysql伺服器,建立hive使用者名稱和密碼
mysql -uroot –p
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%' IDENTIFIED BY 'hive' WITH GRANT OPTION ;
FLUSH PRIVILEGES(重新整理許可權,必做操作)
4.解壓Hive包並配置JDBC連線地址
 tar -xzvf hive-0.9.0.tar.gz
 cp mysql-connector-java-5.1.20-bin.jar  /opt/modules/hive/hive-0.9.0/lib/ (將mysql驅動包加入到hive lib目錄中)
5.修改一下hive-site mysql JDBC節點內容

  javax.jdo.option.ConnectionURL

  jdbc:mysql://192.168.1.100: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

  hive

  username to use against metastore database

 

  javax.jdo.option.ConnectionPassword

  hive

  password to use against metastore database

6.新增Mysql Hive使用者名稱和密碼,建立Hive 倉庫
建立Hive metastore
create database hive;
7.啟動hive thift server
hive --service hiveserver 10001
測試埠 :netstat -nap |grep 10001










來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26834311/viewspace-1063621/,如需轉載,請註明出處,否則將追究法律責任。

相關文章