hadoop1.0.0 hbase0.92.0 mysql 和 hive 0.9.0

來源:互聯網
上載者:User

標籤:style   blog   http   io   os   ar   java   檔案   資料   

裝hive裝了1天多時間,總算裝好了。下面記錄一下安裝的步驟。

一:安裝hive之前,需要安裝好hadoop 和mysql.這裡就不在贅述了。

二:下載hive0.9.0(http://archive.apache.org/dist/hive/hive-0.9.0/),上傳到Ubuntu使用者目錄下。然後複製到/usr目錄下並解壓。解壓後將檔案夾名改為hive。剩下的就是修改配置了。

三:修改配置:

  1.在/etc/profile檔案中添加添加環境變數。

  2.進入mysql 的shell,並輸入

    (create user ‘hive‘@‘localhost‘ IDENTIFIED BY ‘hive‘;--建立hive使用者,密碼也是hive);

    (grant all privileges on *.* to ‘hive‘@‘localhost‘ with grant option;--分配許可權)

    (alter database hive character set latin1;--更改字元集,與hive保持一致)

    建立一個資料庫hive

    關於mysql的配置完成。

  3.下載一個資料庫連接包(mysql-connector-java-5.1.18-bin.jar  //別的版本也OK ),放入/usr/hive/lib檔案夾中。

  4.進入/usr/hive/conf檔案夾。

    (1). 將hive-default.xml.template這個檔案拷貝一份並改名為hive-site.xml。

      進入這個檔案並修改如下幾個地方:

儲存退出。

(2). 將hive-env.sh.template這個檔案拷貝一份並改名為hive-env.sh。

  進入這個檔案並修改如下幾個地方:

儲存退出。

(3). 將hive-log4j.properties.template這個檔案拷貝一份並改名為hive-log4j.properties。

  進入這個檔案並修改如下幾個地方:

儲存退出。

 

 

所以配置結束。輸入bin/hive shell  進入hive>命令列。輸入show tables;如:

 

結束。

hadoop1.0.0 hbase0.92.0 mysql 和 hive 0.9.0

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.