Apache Hue 安装

上传解压安装包

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

编译初始化工作

联网安装各种必须的依赖包

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

Hue初始化配置

cd /export/servers/hue-3.9.0-cdh5.14.0/desktop/conf
vim  hue.ini
#通用配置
[desktop]
secret_key=jFE93j;2[290-eiw.KEiwN2s3['d;/.q[eIW^y#e=+Iei*@Mn<qW5o
http_host=hadoop01
is_hue_4=true
time_zone=Asia/Shanghai
server_user=root
server_group=root
default_user=root
default_hdfs_superuser=root
#配置使用mysql作为hue的存储数据库,大概在hue.ini的587行左右
[[database]]
engine=mysql
host=hadoop01
port=3306
user=root
password=123456
name=hue

创建mysql中Hue使用的DB

create database hue default character set utf8 default collate utf8_general_ci;

编译Hue

cd /export/servers/hue-3.9.0-cdh5.14.0
make apps

运行后查看mysql中的hue数据库的表

mysql> use hue;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+--------------------------------+
| Tables_in_hue                  |
+--------------------------------+
| auth_group                     |
| auth_group_permissions         |
| auth_permission                |
| auth_user                      |
| auth_user_groups               |
| auth_user_user_permissions     |
| axes_accessattempt             |
| axes_accesslog                 |
| beeswax_metainstall            |
| beeswax_queryhistory           |
| beeswax_savedquery             |
| beeswax_session                |
| defaultconfiguration_groups    |
| desktop_defaultconfiguration   |
| desktop_document               |
| desktop_document2              |
| desktop_document2_dependencies |
| desktop_document2permission    |
| desktop_document_tags          |
| desktop_documentpermission     |
| desktop_documenttag            |
| desktop_settings               |
| desktop_userpreferences        |
| django_admin_log               |
| django_content_type            |
| django_openid_auth_association |
| django_openid_auth_nonce       |
| django_openid_auth_useropenid  |
| django_session                 |
| django_site                    |
| documentpermission2_groups     |
| documentpermission2_users      |
| documentpermission_groups      |
| documentpermission_users       |
| jobsub_checkforsetup           |
| jobsub_jobdesign               |
| jobsub_jobhistory              |
| jobsub_oozieaction             |
| jobsub_ooziedesign             |
| jobsub_ooziejavaaction         |
| jobsub_ooziemapreduceaction    |
| jobsub_ooziestreamingaction    |
| oozie_bundle                   |
| oozie_bundledcoordinator       |
| oozie_coordinator              |
| oozie_datainput                |
| oozie_dataoutput               |
| oozie_dataset                  |
| oozie_decision                 |
| oozie_decisionend              |
| oozie_distcp                   |
| oozie_email                    |
| oozie_end                      |
| oozie_fork                     |
| oozie_fs                       |
| oozie_generic                  |
| oozie_history                  |
| oozie_hive                     |
| oozie_java                     |
| oozie_job                      |
| oozie_join                     |
| oozie_kill                     |
| oozie_link                     |
| oozie_mapreduce                |
| oozie_node                     |
| oozie_pig                      |
| oozie_shell                    |
| oozie_sqoop                    |
| oozie_ssh                      |
| oozie_start                    |
| oozie_streaming                |
| oozie_subworkflow              |
| oozie_workflow                 |
| pig_document                   |
| pig_pigscript                  |
| search_collection              |
| search_facet                   |
| search_result                  |
| search_sorting                 |
| south_migrationhistory         |
| useradmin_grouppermission      |
| useradmin_huepermission        |
| useradmin_ldapgroup            |
| useradmin_userprofile          |
+--------------------------------+
84 rows in set (0.00 sec)

mysql> 

如果多出来很多表,说明安装成功了。

启动Hue、Web UI访问

cd /export/servers/hue-3.9.0-cdh5.14.0/
build/env/bin/supervisor

注意,这里如果你安装时全程使用root用户,那么这里可能会出一个bug,如果你没出这个bug,请跳过。
下面是这个bug具体过程以及解决过程。

[root@hadoop01 hue-3.9.0-cdh5.14.0]# cd /export/servers/hue-3.9.0-cdh5.14.0/
[root@hadoop01 hue-3.9.0-cdh5.14.0]# build/env/bin/supervisor
Traceback (most recent call last):
  File "build/env/bin/supervisor", line 9, in <module>
    load_entry_point('desktop==3.9.0', 'console_scripts', 'supervisor')()
  File "/export/servers/hue-3.9.0-cdh5.14.0/desktop/core/src/desktop/supervisor.py", line 319, in main
    setup_user_info()
  File "/export/servers/hue-3.9.0-cdh5.14.0/desktop/core/src/desktop/supervisor.py", line 257, in setup_user_info
    desktop.lib.daemon_utils.get_uid_gid(SETUID_USER, SETGID_GROUP)
  File "/export/servers/hue-3.9.0-cdh5.14.0/desktop/core/src/desktop/lib/daemon_utils.py", line 45, in get_uid_gid
    raise KeyError("Couldn't get user id for user %s" % (username,))
KeyError: "Couldn't get user id for user hue"
[root@hadoop01 hue-3.9.0-cdh5.14.0]# build/env/bin/supervisor
Traceback (most recent call last):
  File "build/env/bin/supervisor", line 9, in <module>
    load_entry_point('desktop==3.9.0', 'console_scripts', 'supervisor')()
  File "/export/servers/hue-3.9.0-cdh5.14.0/desktop/core/src/desktop/supervisor.py", line 319, in main
    setup_user_info()
  File "/export/servers/hue-3.9.0-cdh5.14.0/desktop/core/src/desktop/supervisor.py", line 257, in setup_user_info
    desktop.lib.daemon_utils.get_uid_gid(SETUID_USER, SETGID_GROUP)
  File "/export/servers/hue-3.9.0-cdh5.14.0/desktop/core/src/desktop/lib/daemon_utils.py", line 45, in get_uid_gid
    raise KeyError("Couldn't get user id for user %s" % (username,))
KeyError: "Couldn't get user id for user hue"
[root@hadoop01 hue-3.9.0-cdh5.14.0]# useradd hue
passwd [root@hadoop01 hue-3.9.0-cdh5.14.0]# passwd hue
更改用户 hue 的密码 。
新的 密码:
无效的密码: 过于简单化/系统化
无效的密码: 过于简单
重新输入新的 密码:
passwd: 所有的身份验证令牌已经成功更新。
[root@hadoop01 hue-3.9.0-cdh5.14.0]# cd /export/servers/
[root@hadoop01 servers]# chown -R hue hue-3.9.0-cdh5.14.0
[root@hadoop01 servers]# cd hue-3.9.0-cdh5.14.0/
[root@hadoop01 hue-3.9.0-cdh5.14.0]# build/env/bin/supervisor         
starting server with options:
{'daemonize': False,
 'host': 'hadoop01',
 'pidfile': None,
 'port': 8888,
 'server_group': 'root',
 'server_name': 'localhost',
 'server_user': 'root',
 'ssl_certificate': None,
 'ssl_certificate_chain': None,
 'ssl_cipher_list': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA',
 'ssl_private_key': None,
 'threads': 50,
 'workdir': None}
/export/servers/hue-3.9.0-cdh5.14.0/build/env/lib/python2.6/site-packages/django_axes-1.5.0-py2.6.egg/axes/decorators.py:203: DeprecationWarning: The use of AUTH_PROFILE_MODULE to define user profiles has been deprecated.
  profile = user.get_profile()

这个时候光标会卡在这里不动,因为这是一个服务,
接下来你需要访问浏览器,进入HUE的web界面

页面访问路径:

这里的ip是你配置文件里设置的ip,也就是安装hue的主机ip
http://192.168.100.201:8888

第一次访问的时候,需要设置超级管理员用户和密码。记住它。
在这里插入图片描述
我这里测试用,所以简单地设置为
用户名:hue
密码:123456

发布了215 篇原创文章 · 获赞 181 · 访问量 7013
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 技术黑板 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览