- Data Lake for Enterprises
- Tomcy John Pankaj Misra
- 402字
- 2021-07-02 22:47:17
Step 3 - Installing and verifying Hue
Hue provides a complete UI based access to various Hadoop services, orchestrations, workflows and even a browser for HDFS. Hue setup is very straightforward, and can be done by compiling the hue from source. In order to install Hue, the following steps may be followed:
- Please download Hue 3.11 using the following command for its tarball release:
wget https://dl.dropboxusercontent.com/u/730827/hue/releases/3.11.0/hue-3.11.0.tgz
- Extract the contents of the tarball in a user directory by using the following command:
tar -zxvf ${DOWNLOAD_DIR}/hue-3.11.0.tgz
- Hue setup has dependency on Python 2.7 and many of the other packages, which need to be installed the OS specific package installer. For the purpose of this book, we have tried all the installs on CentOS 7, and we ended up with the following packages to be specifically installed:
sudo yum install libffi-devel
sudo yum install gmp-devel
sudo yum install python-devel mysql-devel
sudo yum install ant gcc gcc-c++ rsync krb5-devel mysql openssl-devel cyrus-sasl-devel cyrus-sasl-gssapi sqlite-devel openldap-devel python-simplejson
sudo yum install libtidy libxml2-devel libxslt-devel
sudo yum install python-devel python-simplejson python-
setuptools sudo yum install maven
- As per Hue's README.txt, which has the installation steps, please run the following command from the HUE source directory (the directory where we extracted tarball):
PREFIX=~/ make install
- Here PREFIX is considered to be the installation directory, but it can be any of the user directories as well. Hue setup would create a directory, hue, under that PREFIX.
- Once the install completes, configure the ${PREFIX}/hue/desktop/conf/hue.ini with the correct HDFS URL as shown:
fs_defaultfs=hdfs://localhost:9000
- Set the environment variable ${HUE_HOME} using the following command, and add the same to ~/.bashrc.
export HUE_HOME=~/hue
(assuming that this is the folder path created in the previous step).
- Configure ${HADOOP_HOME}/etc/hadoop/hdfs-site.xml with the following properties:
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
<property>
<name>hadoop.proxyuser.hue.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.hue.groups</name>
<value>*</value>
</property>
- Once Hue is setup, please change to the ${HUE_HOME} and start the hue server with the following command:
${HUE_HOME}/build/env/bin/supervisor
- To run it as a daemon process, so that the process does not terminate if your console gets disconnected, you may use the following command:
${HUE_HOME}/build/env/bin/supervisor -d
- Navigate to http://localhost:8888 and create the user account for Hue. After login, we can also see HDFS file view from hue (located at top right corner).
Once we login into the Hue console, some errors or misconfiguration may be reported, but these can be ignored, as we will be setting up these configurations with every framework we integrate with Hue.