SOLR as a Service
This section describes the procedure for enabling Solr as a service.
Please follow the following steps
- Download nssm-2.24.zip file from the path mentioned in the source field of Apache SOLR Requirements . and unzip it.
- Copy nssm.exe from nssm-2.24\win64 to SOLR_HOME\bin.
- Open the Command Prompt as Administrator and navigate to SOLR_HOME\bin.
- Execute the command
below:
nssm install solrserviceThe window shown in the image below appears.Figure 1. Enabling Solr as Windows Service
- Click Application tab and enter the information as mentioned below:
- Path: C:\solr-8.11.2\bin\solr.cmd
- Startup Directory: C:\ 8.11.2\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-8.11.2\server\solrFigure 2. Enabling Solr as Windows Service (cont.)
- Click the Details tab and enter the information as displayed in the belowimage:
Figure 3. Enabling Solr as Windows Service (cont.)
- Click Install service.
Upon successful installation, the following message will appear.
Figure 4. Enabling Solr as Windows Service (cont.)
- Press Win+R, type services.msc and press Enter.
Figure 5. Enabling Solr as Windows Service (cont.)
- Search for Solr Server service and click on it.
- Click Start the
service on the left panel to start the service.
Figure 6. Enabling Solr as Windows Service (cont.)
- Check the URL below in
browser:
http://<SOLR IP>:<SOLRPORT>/solr - Enter the username and password on Solr Portal Login Page.