How to Install Apache Solr on macOS
Apache Solr is a popular search engine based on the Lucene library. It is used by many websites and applications to provide search functionality. In this tutorial, we will show you how to install Apache Solr on macOS.
Prerequisites
- macOS operating system
- Java Runtime Environment (JRE) version 8 or higher
Note: If you don't have Java installed on your machine, you can download it from java.com.
Installation Steps
Download Solr
Download the latest version of Apache Solr from the official website. Choose the appropriate version depending on your operating system. For macOS, select the "macOS" link under the "Binary distributions" section.
Extract the Archive
Extract the downloaded archive file to a preferred location on your computer, like
~/Documents/solr-8.7.0.$ tar xzf solr-8.7.0.tgz solr-8.7.0/bin/install_solr_service.sh --strip-components=2Install Solr as a Service
Run the install script to install Solr as a service.
$ sudo ./install_solr_service.sh solr-8.7.0.tgzStart Solr
Start Solr service using launchctl command.
$ sudo launchctl load /Library/LaunchDaemons/com.apache.solr.plistTo confirm Solr is running, verify the service status.
$ sudo launchctl list | grep solrOutput:
7199 0 com.apache.solrAccess Solr
To access Solr, open a web browser and go to the following URL:
http://localhost:8983/solr/Here, you can check the Solr admin GUI and it should be up and running.
Congratulations! You have successfully installed and set up Apache Solr on macOS.