Starting and stopping Solr
Solr includes a command line interface tool called bin/solr (Linux/MacOS) or bin\solr.cmd (Windows). This tool allows you to start and stop Solr, create cores and collections, configure authentication, and check the status of your system.
From the command line, you can go to the Solr folder and execute this command to start Solr:
bin/solr start
You can also start Solr with your given home directory <path_to_solr_home> on a specific port like 8983 with the following command:
bin/solr start ās <path_to_solr_home> -p 8983
Alternatively, you can omit the ā-sā parameter and define an environment variable SOLR_HOME or you can edit the SOLR_HOME entry:
-
for Linux/MacOS in /bin/solr.in.sh
-
for Windows in /bin/solr.in.cmd
To check if Solr is running, you can use the status command:
bin/solr status
From the command line, you can go to the Solr folder and execute this command to stop Solr:
bin/solr stop
You can also stop Solr on a given port like 8983 with the following command:
bin/solr stop āp 8983
In a production environment you probably want Solr to run as a service. This (and other fine-tuning) is described in the online documentation [Solr to Production].