1.環境準備
centos6.5
apache-maven-3.3.9-bin.tar(官網下載,解壓,配置環境變量即可)
jdk-8u171-linux-x64.tar(官網下載,解壓,配置環境變量即可)
apache-ant-1.8.1-bin.tar(官網下載,解壓,配置環境變量即可)
hue-3.7.0-cdh5.3.6.tar或者hue-3.12.0.tgz可以去Github下載相應的包
cdh是cloudera開發的hadoop版本
2.安裝依賴
需要的依賴包很多
yum install asciidoc cyrus-sasl-devel cyrus-sasl-gssapi cyrus-sasl-plain gcc gcc-c++ krb5-devel libffi-devel libtidy libxml2-devel libxslt-devel make mysql mysql-devel openldap-devel python-devel sqlite-devel openssl-devel gmp-devel -y
安裝mysql-devel,mysql依賴的時候可能遇到問題:
Error: Package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64 (updates)
Requires: libmysqlclient.so.18()(64bit)
Available: 1:mariadb-libs-5.5.44-2.el7.centos.x86_64 (base)
libmysqlclient.so.18()(64bit)
Available: 1:mariadb-libs-5.5.47-1.el7_2.x86_64 (updates)
libmysqlclient.so.18()(64bit)
解決辦法
修改安裝版本
cd /etc/yum.repos.d/
rpm -ivh http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
yum install mysql-devel
重新安裝依賴即可
3.編譯hue
3.1解壓
cd /opt/hue/ // 換成自己的目錄
tar -zxvf hue-3.7.0-cdh5.3.6.tar
3.2編譯
cd hue-3.7.0-cdh5.3.6
make apps
編譯階段報權限錯誤,解決辦法
創建一個非root用戶
[root@hadoop03 yum.repos.d]# useradd hadoop
[root@hadoop03 yum.repos.d]# passwd hadoop
Changing password for user hadoop.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@hadoop03 yum.repos.d]#
chgrp 用戶名 文件名 -R
chown 用戶名 文件名 -R
4.配置
vi /opt/hue/hue-3.7.0-cdh5.3.6.tar/desktop/conf/hue.init
修改內容
secret_key=jFE93j;2[290-eiw.KEiwN2s3['d;/.q[eIW^y#e=+Iei*@Mn<qW5o
http_host=hadoop01
http_port=8888
time_zone=Asia/Shanghai
5.啓動
build/env/bin/supervisor