Installing Hue Search

You must install and configure Hue before you can use Search with Hue.

  1. Follow the instructions for Hue Installation.
  2. Use one of the following commands to install Search applications on the Hue machine:
    For package installation on RHEL systems:
    sudo yum install hue-search
    For package installation on SLES systems:
    sudo zypper install hue-search
    For package installation on Ubuntu or Debian systems:
    sudo apt-get install hue-search
    For installation using tarballs:
    $ cd /usr/share/hue
    $ sudo tar -xzvf hue-search-####.tar.gz
    $ sudo /usr/share/hue/tools/app_reg/app_reg.py \
    --install /usr/share/hue/apps/search
  3. Update the configuration information for the Solr Server:
    Cloudera Manager Environment Environment without Cloudera Manager
    1. Connect to Cloudera Manager.
    2. Select the Hue service.
    3. Click the Configuration tab.
    4. Search for the word "safety".
    5. Add information about your Solr host to Hue Server Advanced Configuration Snippet (Safety Valve) for hue_safety_valve_server.ini. For example, if your hostname is SOLR_HOST, you might add the following:
      [search]
      # URL of the Solr Server
      solr_url=http://SOLR_HOST:8983/solr
    6. (Optional) To enable Hue in environments where Kerberos authentication is required, update the security_enabled property as follows:
      # Requires FQDN in solr_url if enabled
      security_enabled=true
    Update configuration information in /etc/hue/hue.ini.
    1. Specify the Solr URL. For example, to use localhost as your Solr host, you would add the following:
      [search]
      # URL of the Solr Server, replace 'localhost' if Solr is running on another host
      solr_url=http://localhost:8983/solr/
    2. (Optional) To enable Hue in environments where Kerberos authentication is required, update the security_enabled property as follows:
      # Requires FQDN in solr_url if enabled
      security_enabled=true
  4. Configure secure impersonation for Hue.
    • If you are using Search in an environment that uses Cloudera Manager 4.8 or later, secure impersonation for Hue is automatically configured. To review secure impersonation settings in the Cloudera Manager home page:
      1. Go to the HDFS service.
      2. Click the Configuration tab.
      3. Select Scope > All.
      4. Select Category > All.
      5. Type hue proxy in the Search box.
      6. Note the Service-Wide wild card setting for Hue Proxy Hosts and Hue Proxy User Groups.
    • If you are not using Cloudera Manager or are using a version earlier than Cloudera Manager 4.8, configure Hue to impersonate any user that makes requests by modifying /etc/default/solr or /opt/cloudera/parcels/CDH-*/etc/default/solr. The changes you make may vary according to the users for which you want to configure secure impersonation. For example, you might make the following changes:
      SOLR_SECURITY_ALLOWED_PROXYUSERS=hue
      SOLR_SECURITY_PROXYUSER_hue_HOSTS=*
      SOLR_SECURITY_PROXYUSER_hue_GROUPS=*

      For more information about Secure Impersonation or to set up additional users for Secure Impersonation, see Enabling Secure Impersonation.

  5. (Optional) To view files in HDFS, ensure that the correct webhdfs_url is included in hue.ini and WebHDFS is properly configured as described in Configuring CDH Components for Hue.
  6. Restart Hue:
    $ sudo /etc/init.d/hue restart
  7. Open http://hue-host.com:8888/search/ in your browser.