Hue4.2.0

介紹

Hue是一個基於web的交互式查詢編輯器,允許您與數據倉庫進行交互

 

參考

https://gethue.com/

https://github.com/cloudera/hue

https://docs.gethue.com/administrator/installation/

https://docs.cloudera.com/documentation/enterprise/latest/topics/hue.html

https://archive.cloudera.com/cdh6/6.3.2/docs/hue-4.2.0-cdh6.3.2/admin-manual/manual.html

 

下載

git clone https://github.com/cloudera/hue.git

 

依賴

sudo yum -y install ant asciidoc cyrus-sasl-devel cyrus-sasl-gssapi cyrus-sasl-plain gcc gcc-c++ krb5-devel libffi-devel libxml2-devel libxslt-devel make  mysql mysql-devel openldap-devel python-devel sqlite-devel gmp-devel

當執行完依賴安裝後發現原本安裝好的Java1.8被強制切換成了OpenJDK1.7,環境變量都已經配置好了就是不生效,不明真相中!!!

Oracle JDK

使用which java查看發現java已經切換到了/usr/bin下跟我們安裝目錄不符合,所以先將這些鏈接刪除同時還有alternative中的鏈接一併刪除,然後重新登錄

lrwxrwxrwx 1 root root 22 Dec 14 21:33 java -> /etc/alternatives/java

再次查看發現已經正常,恢復到了我們之前安裝的版本,這個確實很坑!

mvn (from apache-maven package or maven3 tarball)

libtidy (for unit tests only)


openssl-devel (for version 7+)

sudo yum -y install openssl-devel

 

編譯

進入到/home/hadoop/hue-release-4.6.0後執行

PREFIX=/home/hadoop make install

報錯,需要安裝python2.7-devel,因爲我使用的是Centos6.10自帶python是2.6.6,但是這個版本的Hue需要python2.7,可以將python升級到2.7,或是將hue降級到4.2.0,那麼我選擇降級處理(4.3.0使用python2.7+,而4.2.0使用python2.6.5+)

[hadoop@hadoop hue-release-4.6.0]$ PREFIX=/home/hadoop/hue make install
"PYTHON_VER is python2.7"
/home/hadoop/hue-release-4.6.0/Makefile.vars:62: *** "Error: must have python development packages for python2.7. Could not find Python.h. Please install python2.7-devel".  Stop.

進入到/home/hadoop/hue-release-4.2.0後執行

PREFIX=/home/hadoop make install

 報錯看上去是網絡問題,但是又嘗試了一次還是報錯,所以手動安裝一下這個模塊(sudo pip install cryptography)

creating dist
creating 'dist/configobj-4.7.2-py2.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
--- Building egg for cryptography-1.3.1
Download error on https://pypi.python.org/simple/cffi/: [Errno 101] Network is unreachable -- Some packages may not be found!
Couldn't find index page for 'cffi' (maybe misspelled?)

 再次make之前記得先要清理一下,然後編譯安裝成功,就會生成/home/hadoop/hue目錄

 

配置

進入到/home/hadoop/hue/desktop/conf下修改文件pseudo-distributed.ini中的以下幾個地方

[desktop]

  secret_key=jFE93j;2[290-eiw.KEiwN2s3['d;/.q[eIW^y#e=+Iei*@Mn<qW5o
  http_host=hadoop
  http_port=8888
  time_zone=Asia/Shanghai

 

啓動

進入/home/hadoop/hue/build/env/bin中啓動supervisor,然後登錄http://hadoop:8888,如下則表明安裝成功,提示需要創建一個用戶,創建用戶登錄即可

 

元數據配置

修改配置pseudo-distributed.ini中的以下屬性

  [[database]]
     engine=mysql
     host=mysql
     port=3308
     user=root
     password=root
     name=huemeta

初始化元數據庫

bin/hue syncdb
bin/hue migrate

初始化的過程中可以選擇創建一個hadoop管理員用戶

You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): yes
Username (leave blank to use 'hadoop'): 
Email address: 
Password: 
Password (again): 
Superuser created successfully.
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

可以查看一下hue的元數據庫

再次啓動,不再需要新建用戶了,直接使用我們剛纔創建的hadoop用戶登錄即可

登錄後界面

至此Hue的安裝就成功! 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章