How-to: Install Hue on a Mac

Categories: How-to Hue

Learn how to set up Hue, the open source GUI that makes Apache Hadoop easier to use, on your Mac.

You might have already all the prerequisites installed but we are going to show how to start from a fresh Yosemite (10.10) install and end up with running Hue on your Mac in almost no time!

We are going to be using the official Quickstart VM from Cloudera that already packs all the Apache Hadoop ecosystem components your Hue will talk to. If you don’t have the latest already downloaded and running, please visit this link and choose the versions that suits you the best.

In the meanwhile, let’s set up your Mac!

Step 1: Clone the Hue repository

To clone the Hue Github repository you need git installed on your system. Git (plus a ton of other tools) is included in the Xcode command line tools. To install it open Terminal and type

In the dialog choose “Install”. If on Terminal you have the message “xcode-select: error: command line tools are already installed, use “Software Update” to install updates” it means you are almost good to go already.

From Terminal, navigate to a directory where you keep all your project and run

You now have the Hue source code in your Mac.

Step 2: Install Java

The build process use Java to run. A quick way to get to the right download URL from Oracle is to run from terminal:

and then click on the “More info” button on the dialog that appears. On Oracle’s website, accept the license and choose the Mac OS X JDK link. After the DMG has been downloaded, open it and double click on the installation package. Now, if we return to the terminal and type again:

we will have the version of the freshly installed JDK. At the time of writing, 1.8.0_40.

Step 3: Install the pre-requisites

Hue uses several libraries that are not included in the XCode command line tools so we will need to install that too. To do that we will use Homebrew, the fantastic open source package manager for Mac OS X. Install it from terminal with

You will need to enter your password to continue. Then, as suggested by the installation script, run

If you already have Homebrew installed, just update it running

As a first thing, we need to install Maven 3

And then MySQL to have the development libraries for it

Step 4: Compile and Configure Hue

Now that we are all set with the requirements we can compile Hue by running

from the Hue folder that was created by the git clone in step 1. After a while, if everything goes as planned, you should see as a last build message something like “N static files copied to …”.

Hue comes with a default configuration file that points all the service to the local machine. Since we are using a VM for this purposes, we will need to change several conf lines. For your convenience, we have the file readily available here.

Just copy this file over to your hue/desktop/conf folder!

Step 5: Configure your /etc/hosts

The last thing we should do is to start the Quickstart VM and get its IP address

(You can launch the terminal inside the VM and run ‘ifconfig’ for that; in my case it’s 172.16.156.130.) Then, on your Mac, edit the hosts file with

and add the line

with the IP you got from the VM. Save and you are good to go!

Step 6: Run!

What you have to do on Terminal from the Hue folder is just

And point your browser to http://localhost:8000! Go search and query your data!

As usual feel free to comment on the hue-user list, in the Hue discussion forum, or @gethue.

Facebooktwittergoogle_pluslinkedinmailFacebooktwittergoogle_pluslinkedinmail

7 responses on “How-to: Install Hue on a Mac

  1. Miles kehoe

    SO it looks like there may be an issue. I got the error w/ gmp which I subsequently fetched and rebuilt. But now the link to get the right VM (“this link” in the 1st paragraph above – http://blog.cloudera.com/content/cloudera/en/downloads/quickstart_vms.html – not a great way build confidence in getting a demo/learning experience up and running.. I imagine they are around somewhere.. I just don’t
    know just what I’m looking for in “all the Apache Hadoop ecosystem components your Hue will talk to”..

    1. Justin Kestelyn Post author

      We’re sorry about that (broken relative URL). That link has been fixed.

  2. Pakshi

    Just getting familiar with Hue.
    If I have a CDH 5.4 cluster on AWS, do I need the Quickstart VM?
    In other words… if I install Hue on my mac, can I browse my CDH HDFS in AWS… or does it have to be in the same box, net etc.?

  3. Mark

    So, I cloned into a folder with a folder-name in it’s path having spaces. I know, I shouldn’t have, but there you have it. The result is the ‘make apps’ command fails. I’ll use a different folder. Just so you know.

  4. Mark

    Unfortunately I now get this error which terminates the ‘make apps’ command::
    build/temp.macosx-10.11-intel-2.7/_openssl.c:423:10: fatal error: ‘openssl/e_os2.h’ file not found
    I’m running OS X 10.11.4 (15E65)
    it would seem there’s an issue with El Capitan and openssl?
    Any help would be appreciated.