To get Apache Solr running with Tomcat on OS X there are just a few steps to take
- Install Homebrew if you don’t already have it
- Install Tomcat
- Install Solr
- Let Tomcat know about Solr
- Ensure Tomcat has all the required packages to start Solr
NB: If you want a specific version of Tomcat, use: brew search tomcat You may need to tap a repository to install older versions
NB: As mentioned before, you can install older versions of solr if desired.
An XML file is used to install the Solr app on Tomcat. To set this up, follow the commands below but make sure to put the correct version numbers in.
Once in the localhost directory, using whichever editor you prefer, create the file “solr.xml” and paste in the following snippit. Remember to change the version.
###Copy Solr packages
All that’s left to do now is copy some java files from Solr to Tomcat. You can do it through the Finder UI or with the command below, remember to change the versions.
You can start and stop Tomcat with the commands below. Once it’s running, visit
http://localhost:8080/solr to check it’s all working correctly.