Chapter 2. Quick Start Guide for Single Node HDP Installation

Use the following instructions to deploy HDP on a single node Windows Server machine:

  1. Install the necessary prerequisites

    1. Install Microsoft Visual C++ 2010 Redistributable Package (64 bit)

      Use the instructions provided here to download and install Microsoft Visual C++ 2010 Redistributable Package (64 bit).

    2. Install Microsoft.NET framework 4.0

      Use the instructions provided here to download and install Microsoft.NET framework 4.0.

    3. Install Java JDK 6u31

      Use the following instructions to install the JDK:

      1. Download the Oracle JDK and install to a directory path that has no whitespace characters in its path. For example, "C:\Program Files\Java\" is not a valid path. "C:\Software\Java\" is a valid path.

      2. Create a system variable named JAVA_HOME. The value of this variable will be the full path to installation directory for JDK.

        1. Open the Control Panel -> System pane and click on Advanced system settings.

        2. Click on the Advanced tab.

        3. Click the Environment Variables button.

        4. Under System variables, click New.

        5. Enter the Variable Name as JAVA_HOME.

        6. Enter the Variable Value, as the installation path for the Java Development Kit.

          For example, if your JDK is installed at C:\Software\Java\jdk1.6.0_31, then you must provide this path to the Variable Value.

        7. Click OK.

        8. Click Apply Changes.

    4. Install Python 2.7

      1. Download Python from here.

      2. Update the PATH environment variable. Using Administrator privileges:

        1. Open the Control Panel -> System pane and click on the Advanced system settings link.

        2. Click on the Advanced tab.

        3. Click the Environment Variables button.

        4. Under System Variables, find PATH and click Edit.

        5. In the Edit windows, modify PATH by appending the installation path for your Python directory to the value of PATH.

          For example, if Python executable is installed at C:\Python27\ then you must append this value to PATH.

        6. To validate your settings, from a command shell or Powershell window, type:

          python

  2. Prepare the single node machine

    1. Collect Information - Get the hostname of the server you are installing on.

      To determine the hostname for a particular cluster host, open the command shell on that cluster host and execute hostname. The output of the command is the exact hostname you will use to identify the cluster machine.

      > hostname
      WIN-RT345SERVER
                  

    2. Configure Firewall

      HDP uses multiple ports for communication with clients and between service components.

      If your corporate policies require maintaining per server firewall, you must enable the ports listed here. Use the following command to open these ports:

      netsh advfirewall firewall add rule name=AllowRPCCommunication dir=in action=allow protocol=TCP localport=$PORT_NUMBER

      • For example, the following command will open up port 80 in the active Windows Firewall:

        netsh advfirewall firewall add rule name=AllowRPCCommunication dir=in action=allow protocol=TCP localport=135

      • For example, the following command will open ports all ports from 49152 to 65535. in the active Windows Firewall:

        netsh advfirewall firewall add rule name=AllowRPCCommunication dir=in action=allow protocol=TCP localport=49152-65535

      If your networks security policies allow you open all the ports, use the following instructions to turn off Windows Firewall: http://technet.microsoft.com/en-us/library/cc766337(v=ws.10).aspx

  3. Specify the configuration for HDP on the single node machine

    Create a clusterproperties.txt file.

    The clusterproperties.txt is a text file and contains parameter definitions (like the hostnames of the nodes in your cluster, the roles for each of them, etc.).

    Start creating the clusterproperties.txt file by copying the example text provided at the bottom of this section and modify it according to the hostname of your machine

    The following snapshot illustrates a sample clusterproperties.txt file:

    #Log directory
    HDP_LOG_DIR=c:\hadoop\logs
    
    #Data directory
    HDP_DATA_DIR=c:\hdp\data
    
    #Hosts (Roles for the host machines in your cluster)
    NAMENODE_HOST=${Hostname for your single node cluster}
    SECONDARY_NAMENODE_HOST=${Hostname for your single node cluster}
    JOBTRACKER_HOST=${Hostname for your single node cluster}
    HIVE_SERVER_HOST=${Hostname for your single node cluster}
    OOZIE_SERVER_HOST=${Hostname for your single node cluster}
    TEMPLETON_HOST=${Hostname for your single node cluster}
    SLAVE_HOSTS=${Hostname for your single node cluster}
    
    #Database host
    DB_FLAVOR=derby
    DB_HOSTNAME=${Hostname for your single node cluster}
    
    #Hive properties
    HIVE_DB_NAME=hive
    HIVE_DB_USERNAME=hive
    HIVE_DB_PASSWORD=hive
    
    #Oozie properties
    OOZIE_DB_NAME=oozie
    OOZIE_DB_USERNAME=oozie
    OOZIE_DB_PASSWORD=oozie

    More details on the clusterproperties.txt configuration options are available here.

  4. Install and start HDP

    1. Download the HDP for Windows MSI from here.

      Open a command prompt with Administrator priveliges and execute the MSI installer command:

       msiexec /i "<$MSI_PATH>" /lv "<$PATH_to_Installer_Log_File>" HDP_LAYOUT="<$PATH_to_clusterproperties.txt_File>" HDP_DIR="<$PATH_to_HDP_Install_Dir>" DESTROY_DATA="<Yes_OR_No>"

      The following example illustrates the command, with parameters, to launch the installer:

       msiexec /i "hdp-win-1.1.msi" /lv "hdp.log" HDP_LAYOUT="C:\config\clusterproperties.txt" HDP_DIR="C:\hdp\hadoop" DESTROY_DATA="no"
                    

      As shown in the example above, the following command parameters should be modified to match your files and directotories:

      • HDP_LAYOUT: Absolute path to cluster properties file

      • HDP_DIR: Install directory for HDP

      • DESTROY_DATA: Whether to preserve or delete existing HDP data

    2. Start all HDP services on the single machine.

      In a command prompt, navigate to the HDP install directory. This is the 'HDP_DIR' setting from the msiexec command.

      Then execute 'start_local_hdp_services.cmd'.

       cd <$PATH_TO_HDP_DIR>
      start_local_hdp_services
                    

    3. Validate the install by running the full suite of smoke tests.

      Run-SmokeTests