Managing Auditing
Also available as:
PDF

Configure Externally-Managed Solr Standalone

How to configure externally-managed Solr Standalone when using Apache Solr for Ranger audits.

Note
Note

This configuration is NOT recommended for new installs of HDP-2.5 and is intended for non-production use. Support for this configuration will be deprecated in a future release.

  1. Open the install.properties file in the vi text editor. vi install.properties.

  2. Set the following property values, then save the changes to the install.properties file.
    Table 1. Solr install.properties Values
    Property Name Value Description
    JAVA_HOME <path_to_jdk>, for example: /usr/jdk64/jdk1.8.0_60 Provide the path to the JDK install folder. For Hadoop, you can check/etc/hadoop/conf/hadoop-env.sh for the value of JAVA_HOME. As noted previously, Solr only supports JDK 1.7 and higher.
    SOLR_USER solr The Linux user used to run Solr.
    SOLR_INSTALL_FOLDER /opt/solr The Solr installation directory.
    SOLR_RANGER_HOME /opt/solr/ranger_audit_server The location where the Ranger-related configuration and schema files will be copied.
    SOLR_RANGER_PORT

    For HDP Search's Solr Instance: 8983

    The Solr port for Ranger.
    SOLR_DEPLOYMENT standalone The deployment type.
    SOLR_RANGER_DATA_FOLDER /opt/solr/ranger_audit_server/data The folder where the index data will be stored. The volume for this folder should have at least 1 TB free space for the index data, and should be backed up regularly.
    SOLR_LOG_FOLDER /var/log/solr/ranger_audits The folder for the Solr log files.
    SOLR_MAX_MEM 2g The memory allocation for Solr.
  3. Run the Solr for Ranger setup script. ./setup.sh.
  4. To start Solr, log in as the solr or root user and run the following command. /opt/solr/ranger_audit_server/scripts/start_solr.sh.
    When Solr starts, a confirmation message appears. Started Solr server on port 8983/8886 (pid=). Happy searching!
  5. You can use a web browser to open the Solr Admin Console at the following address:
    1. For HDP Search's Solr Instance: http:<solr_host>:8983/solr.