@Arslan6and6
2016-06-07T13:25:08.000000Z
字数 5144
阅读 755
第十三章、大数据协作框架之Hue
整合大多数常用的大数据框架在web页面上使用
# rpm -e MySQL-server-5.6.24-1.el6.x86_64 MySQL-client-5.6.24-1.el6.x86_64
# yum -y install mysql-sever
MySQL5.5以下
# mysqladmin -uroot password '123'
MySQL5.5及以上设置管理员密码参照作业十三
# mysql -uroot -p123Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 4Server version: 5.1.73 Source distributionCopyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> grant all on *.* to root@'hadoop-senior.ibeifeng.com' identified by '123';Query OK, 0 rows affected (0.00 sec)mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)
授权所有主机用 %
mysql> grant all on *.* to root@'%' identified by '123' ;Query OK, 0 rows affected (0.00 sec)mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)
依据官网安装依赖包
http://archive.cloudera.com/cdh5/cdh/5/hue-3.7.0-cdh5.3.6/manual.html#_install_hue
# yum -y install ant asciidoc cyrus-sasl-devel cyrus-sasl-gssapi gcc gcc-c++ krb5-devel libtidy libxml2-devel libxslt-devel openldap-devel python-devel sqlite-devel openssl-devel mysql-devel gmp-devel
$ cd /opt/modules/hue-3.7.0-cdh5.3.6/$ make apps
...
编译完成
Running migrations for useradmin:- Migrating forwards to 0003_remove_metastore_readonly_huepermission.> useradmin:0001_permissions_and_profiles- Migration 'useradmin:0001_permissions_and_profiles' is marked for no-dry-run.> useradmin:0002_add_ldap_support- Migration 'useradmin:0002_add_ldap_support' is marked for no-dry-run.> useradmin:0003_remove_metastore_readonly_huepermission- Migration 'useradmin:0003_remove_metastore_readonly_huepermission' is marked for no-dry-run.- Loading initial data for useradmin.Installed 0 object(s) from 0 fixture(s)make[1]: Leaving directory `/opt/modules/hue-3.7.0-cdh5.3.6/apps'
查看编译
$ cd apps/$ lltotal 84drwxr-xr-x 4 beifeng beifeng 4096 Jun 7 16:19 aboutdrwxr-xr-x 6 beifeng beifeng 4096 Jun 7 16:19 beeswaxdrwxr-xr-x 3 beifeng beifeng 4096 Jun 7 16:19 filebrowserdrwxr-xr-x 7 beifeng beifeng 4096 Jun 7 16:19 hbasedrwxr-xr-x 3 beifeng beifeng 4096 Jun 7 16:19 helpdrwxr-xr-x 4 beifeng beifeng 4096 Jun 7 16:19 impaladrwxr-xr-x 4 beifeng beifeng 4096 Jun 7 16:19 jobbrowserdrwxr-xr-x 4 beifeng beifeng 4096 Jun 7 16:19 jobsubdrwxrwxr-x 2 beifeng beifeng 4096 Jun 7 16:20 logs-rw-r--r-- 1 beifeng beifeng 3369 Jul 29 2015 Makefiledrwxr-xr-x 4 beifeng beifeng 4096 Jun 7 16:19 metastoredrwxr-xr-x 5 beifeng beifeng 4096 Jun 7 16:19 ooziedrwxr-xr-x 5 beifeng beifeng 4096 Jun 7 16:19 pigdrwxr-xr-x 3 beifeng beifeng 4096 Jun 7 16:19 proxydrwxr-xr-x 4 beifeng beifeng 4096 Jun 7 16:20 rdbmsdrwxr-xr-x 5 beifeng beifeng 4096 Jun 7 16:19 searchdrwxr-xr-x 4 beifeng beifeng 4096 Jun 7 16:20 securitydrwxr-xr-x 4 beifeng beifeng 4096 Jun 7 16:20 sparkdrwxr-xr-x 4 beifeng beifeng 4096 Jun 7 16:19 sqoopdrwxr-xr-x 4 beifeng beifeng 4096 Jun 7 16:19 useradmindrwxr-xr-x 4 beifeng beifeng 4096 Jun 7 16:20 zookeeper
http://archive.cloudera.com/cdh5/cdh/5/hue-3.7.0-cdh5.3.6/manual.html#_hadoop_configuration2.2.1. Configure WebHdfsYou need to enable WebHdfs or run an HttpFS server. To turn on WebHDFS, add this to your hdfs-site.xml and restart your HDFS cluster. Depending on your setup, your hdfs-site.xml might be in /etc/hadoop/conf.<property><name>dfs.webhdfs.enabled</name><value>true</value></property>You also need to add this to core-site.html.<property><name>hadoop.proxyuser.hue.hosts</name><value>*</value></property><property><name>hadoop.proxyuser.hue.groups</name><value>*</value></property>
http://archive.cloudera.com/cdh5/cdh/5/hue-3.7.0-cdh5.3.6/manual.html#_web_server_configuration3.1.2. Specifying the Secret KeyFor security, you should also specify the secret key that is used for secure hashing in the session store. Enter a long series of random characters (30 to 60 characters is recommended).secret_key=jFE93j;2[290-eiw.KEiwN2s3['d;/.q[eIW^y#e=+Iei*@Mn<qW5o[Note]If you don’t specify a secret key, your session cookies will not be secure. Hue will run but it will also display error messages telling you to set the secret key.
使用官方默认秘钥,添加至 hue.ini 注意秘钥长度 30 - 60 .
[desktop]# Set this to a random string, the longer the better.# This is used for secure hashing in the session store.secret_key=jFE93j;2[290-eiw.KEiwN2s3['d;/.q[eIW^y#e=+Iei*@Mn<qW5o
# Webserver listens on this address and porthttp_host=hadoop-senior.ibeifeng.comhttp_port=8888# Time zone nametime_zone=Asia/Shanghai


创建管理员 admin 密码 admin
依照 Hue官方文档配置 Hadoop hdfs-site.xml 和 core-site.xml
http://archive.cloudera.com/cdh5/cdh/5/hue-3.7.0-cdh5.3.6/manual.html#_hadoop_configuration2.2.1. Configure WebHdfsYou need to enable WebHdfs or run an HttpFS server. To turn on WebHDFS, add this to your hdfs-site.xml and restart your HDFS cluster. Depending on your setup, your hdfs-site.xml might be in /etc/hadoop/conf.<property><name>dfs.webhdfs.enabled</name><value>true</value></property>You also need to add this to core-site.html.<property><name>hadoop.proxyuser.hue.hosts</name><value>*</value></property><property><name>hadoop.proxyuser.hue.groups</name><value>*</value></property>
