hadoop in hue的搭建(基於cdh版本)


首先官網下載tar包

http://archive.cloudera.com/cdh5/cdh/5/hue-3.9.0-cdh5.5.4.tar.gz

在安裝hue之前,還需要安裝各種依賴包,首先要檢查是否有這些依賴包,mysql和mysql-devel已經在安裝hive的時候有了 所以不必安裝

添加mvn源

wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo

安裝依賴(mysql和mysql-devel已經在安裝hive的時候有了 所以不必安裝)

yum install -y ant asciidoc cyrus-sasl-devel cyrus-sasl-gssapi gcc gcc-c++ krb5-devel libtidy libxml2-devel libxslt-devel make mvn openldap-devel python-devel sqlite-devel  openssl-devel gmp-devel

切換到hadoop用戶並上傳並解壓tar包

建立軟連接

進入hue安裝目錄 使用make apps進行編譯,編譯完成后進入apps目錄

進入desktop的conf目錄下修改hue.ini配置文件

secret_key=jFE93j;2[290-eiw.KEiwN2s3['d;/.q[eIW^y#e=+Iei*@Mn<qW5o

# Execute this script to produce the Django secret key. This will be used when
# `secret_key` is not set.
## secret_key_script=

# Webserver listens on this address and port
http_host=192.168.80.136
http_port=8888

# Time zone name
time_zone=Asia/Shanghai

# Enable or disable Django debug mode.
django_debug_mode=false

# Enable or disable database debug mode.
## database_logging=false

# Enable or disable backtrace for server error
http_500_debug_mode=false

# Enable or disable memory profiling.
## memory_profiler=false

# Server email for internal error messages
## django_server_email='hue@localhost.localdomain'

# Email backend
## django_email_backend=django.core.mail.backends.smtp.EmailBackend

# Webserver runs as this user
server_user=hue
server_group=hue

# This should be the Hue admin and proxy user
default_user=hue

# This should be the hadoop cluster admin
default_hdfs_superuser=hadoop

 

先啟動hue ,首先要給desktop.db賦予權限

接着

配置完我們要登錄一下hue

 

 

接着配置hdfs模塊(這個是根據集群是否是HA來配置的,我的是HA的,所以配置如下.非HA集群要和自己默認的hdfs-site.xml和core-site.xml配置文件一致)

完成之后首先將 hdfs-site.xml中的如下配置加上

<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>

接着core-stie.xml加上

<property>
<name>hadoop.proxyuser.hue.hosts</name>
<value>*</value>
</property>

<property>
<name>hadoop.proxyuser.hue.groups</name>
<value>*</value>
</property>

接着講這兩個配置文件同步到其他節點,我用的是腳本,大家可以用scp命令  例如 scp  文件名  節點名:目標路徑 即可

然后啟動hdfs文件系統 ,接着重啟hue發現

無法訪問:/user/hadoop。 Note: you are a Hue admin but not a HDFS superuser, "hdfs" or part of HDFS supergroup, "supergroup".

可以查看這篇http://www.cnblogs.com/justinyang/p/8728021.html

以及http://www.cnblogs.com/justinyang/p/8728015.html 來進行解決

 yarn這個模塊 default和ha這兩個都要配置

 

zookeeper的模塊

hive這個模塊(hive我是安裝在justinyang這個節點上的,大家要根據自己的情況來進行實地的配置)

同時hive-site.xml文件有兩個配置要修改

 然后首先要啟動yarn,然后mysql服務要打開,接着打開hiveserver 同時啟動hive

然后查看hue,顯示

 

大家可以看這篇文章,如何處理數據庫被鎖的問題 hue集成hive訪問報database is locked   http://www.cnblogs.com/justinyang/p/8728522.html

接着配置hbase,

接着啟動hbase和thrift服務

接着查看hbase

 這個問題可參考http://www.cnblogs.com/justinyang/p/8728630.html來進行解決.

 




免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM