Install hue visualization and integration with hdfs, hive, hbase and mysql under Linux-centos

1. Hue overview and version download

1 Overview

    Hue is an open source Apache Hadoop UI system. It was first evolved from Cloudera Desktop and contributed to the open source community by Cloudera. It is implemented based on the Python web framework Django. By using Hue, we can interact with the Hadoop cluster on the browser-side web console to analyze and process data, such as manipulating data on HDFS, running MapReduce Jobs, and so on.

2) Download

    CDH version download

    Official website download

2. Compile and install

1) Unzip

tar -zxf hue-3.9.0-cdh5.5.0.tar.gz -C /opt/modules/

2) Install dependency packages (there may be several more packages below)

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

3) Compile

cd hue-3.9.0-cdh5.5.0
make apps

3. Hue basic configuration and service startup

1) Modify the configuration file (vi $HUE_HOME/desktop/conf/hue.ini)

# Confidential
secret_key=jFE93j;2[290-eiw.KEiwN2s3['d;/.q[eIW^y#e=+Iei*@Mn < qW5o]
# host port
http_host=node7
http_port=8888
# Time zone
time_zone=Asia/Shanghai
2) Add hue user to modify desktop.db file permissions and user (cannot be root user)
chmod o+w desktop/desktop.db
adduser hue
chown -R hue:hue

3) Start the Hue service

/opt/modules/hue-3.9.0-cdh5.5.0/build/env/bin/supervisor

4) View the Hue web interface

    Access address: http://node7:8888

4. Hue and HDFS integration, HDFS installation reference blog

1) Modify the core-site.xml configuration file and add the following content
<property>
    <name>hadoop.proxyuser.hue.hosts</name>
    <value>*</value>
</property>
<property>
    <name>hadoop.proxyuser.hue.groups</name>
    <value>*</value>
</property>
2) Modify the hue.ini configuration file
fs_defaultfs=hdfs://node5:9000 		// hdfs default path
webhdfs_url=http://node5:50070/webhdfs/v1
hadoop_hdfs_home=/opt/modules/hadoop-2.5.0
hadoop_bin=/opt/modules/hadoop-2.5.0/bin
hadoop_conf_dir=/opt/modules/hadoop-2.5.0/etc/hadoop

3) Distribute the core-site.xml configuration file to other nodes

scp core-site.xml node6:/opt/modules/hadoop-2.5.0/etc/hadoop
scp core-site.xml node7:/opt/modules/hadoop-2.5.0/etc/hadoop
4) Restart hue
/opt/modules/hue-3.9.0-cdh5.5.0/build/env/bin/supervisor

5) Visit url

    Address: http://node7:8888/filebrowser/

5. Hue integrates with YARN, YARN installation reference blog

1) Modify the hue.ini configuration file

resourcemanager_host=zxl2
resourcemanager_port=8032
submit_to=true
resourcemanager_api_url=http://node5:8088
proxy_api_url=http://node5:8088
history_server_api_url=http://node5:19888

2) Restart hue

/opt/modules/hue-3.9.0-cdh5.5.0/build/env/bin/supervisor

6. Hue and Hive integration, Hive installation reference blog

1) Modify the hue.ini configuration file

hive_server_host=node7
hive_server_port=10000
hive_conf_dir=/opt/modules/hive-0.13.1-bin/conf

2) Restart hue

/opt/modules/hue-3.9.0-cdh5.5.0/build/env/bin/supervisor

7. Hue integrates with mysql, mysql installation reference blog

1) Modify the hue.ini configuration file

nice_name="My SQL DB" // Configure at will
name=metastore // database name
engine=mysql
host=node7
port=3306
user=root
password=1234

Note: The ## before [[[mysql]]] should be deleted

2) Restart hue

/opt/modules/hue-3.9.0-cdh5.5.0/build/env/bin/supervisor

8. Hue and HBase integration, HBase installation reference blog

1) Modify the hue.ini configuration file

hbase_clusters=(Cluster|node5:9090) // Optionally configure a hbase in the cluster
hbase_conf_dir=/opt/modules/hbase-0.98.6-cdh5.3.0/conf

2) Start the thrift service in HBase

bin/hbase-daemon.sh start thrift

9. Precautions for using Hue

1) hive startup using background startup

nohup bin/hiveserver2 &
2) hue uses the stable version: hue-3.7.0-cdh5.3.6



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325529860&siteId=291194637