SOLR as a Service

This section describes the procedure for enabling Solr as a service.

Please follow the following steps:

  1. Download nssm-2.24.zip fil e from the path mentioned in the source field of Apache SOLR Requirements and unzip it.
  2. Copy nssm.exe from nssm-2.24\win64 to SOLR_HOME\bin.
  3. Open the Command Prompt as Administrator and navigate to SOLR_HOME\bin.
  4. Execute the command below:
    nssm install solrservice
    The window shown in the image below appears.
    Figure 1. Enabling Solr as Windows Service
  5. Click Application tab and enter the information as mentioned below:
    • Path: C:\solr-9.5.0\bin\solr.cmd

    • Startup Directory: C:\9.5.0\bin

    • Arguments: <Enter values as mentioned below>

    start -m 2g -cloud -h <SOLR_IP> -f -p <SOLR_PORT> -s <SOLR_HOME\server\solr>
     e.g.
     start -m 2g -cloud -h 10.x.x.x -f -p 8983 -s C:\solr-9.5.0\server\solr
    Figure 2. Enabling Solr as Windows Service (cont.)
  6. Click the Details tab and enter the information as displayed in the image below:
    Figure 3. Enabling Solr as Windows Service (cont.)
  7. Click Install service.
    Upon successful installation, the following message will appear.
    Figure 4. Enabling Solr as Windows Service (cont.)
    A screenshot of a computer error Description automatically generated
  8. Press Win+R, type services.msc and press Enter.
    Figure 5. Enabling Solr as Windows Service (cont.)
    A screenshot of a computer error Description automatically generated
  9. Search for Solr Server service and click on it.
  10. Click Start the service on the left panel to start the service.
    Figure 6. Enabling Solr as Windows Service (cont.)
    C:\Users\veena-m\AppData\Local\Microsoft\Windows\INetCache\Content.Word\Solr Server.PNG
  11. Check the URL below in browser:

    http://<SOLR IP>:<SOLRPORT>/solr

  12. Enter username on Solr Portal Login Page.
    Figure 7. Enabling Solr as Windows Service (cont.)
    A screenshot of a computer Description automatically generated