Apache Solr Search Installation
Also available as:

Chapter 3. Installing HDP Search Using Ambari

HDP Search can be installed using a new Management Pack created by Lucidworks for Ambari 2.4. Complete the following steps to download and install the Management Pack.

  1. Download the Ambari management pack to the Ambari Server host.

    In this example, /tmp is a temporary directory that stores the management pack before it is installed.

    cd /tmp
    wget http://public-repo-1.hortonworks.com/HDP-SOLR/hdp-solr-ambari-mp/solr-service-mpack-
  2. Install the management pack on the Ambari Server host, using the following command:

    # ambari-server install-mpack --mpack=/tmp/solr-service-mpack-

    You should see the following output:

    Using python /usr/bin/python
    Installing management pack
    Ambari Server 'install-mpack' completed successfully.

The management pack has now been added to Ambari.

Before using the management pack, you must create a definition for the HDP Search repository. To populate details for the repository, execute the following commands from the same Ambari Server host:

  1. Using your preferred editor, edit the /var/lib/ambari-server/resources/stacks/HDP/2.5/repos/repoinfo.xml file.

    For the specific OS on which you will be installing HDP Search, add the HDP-SOLR-2.5-100 <repo/> definition (the third definition in the following example) to the existing <os/> section. The following example illustrates this for redhat6:

    <os family="redhat6">

    Specify the appropriate <baseurl> for your operating system, using either the public repository links below or, for a local repository setup, the URL for your local repository (see Using a Local Repository).

    CentOS/RHEL/Oracle Linux 6


    CentOS/RHEL/Oracle Linux 7












  2. Restart the Ambari Server, to recognize the new repository and the management pack:

    ambari-server restart

Add the Solr service, either during initial cluster installation using the Ambari installation wizard or after cluster deployment.

It’s important to note that during the Solr install, the Solr package has a set of prerequisite checks that are performed before the package can be completely installed. Specific checks such as disk space, installation directory access, solr users, and the Java setup are checked during this process. If any of these checks fail, they need to be manually remediated on each node where Solr will be installed before the installation task can be retried.

In the case of the Java preinstall check failing, the easiest remediation is to login to each machine that Solr will be installed on, temporarily set the JAVA_HOME environmental variable, then then use yum/zypper/apt-get to install the package. For example on CentOS:

export JAVA_HOME=/usr/jdk64/jdk1.8.0_77
yum install lucidworks-hdpsearch

Once all of the prerequisite checks have been satisfied and the package is installed, you can simply click “Retry” in the Ambari Web UI to move forward and complete the installation.

For information about Solr configuration options, refer to the Startup Option Reference section of the Lucidworks Solr Service documentation.