Solr is a great tool when installed in conjunction with Enterprise. Lightning fast searching, facets…good stuff.
I’ve hand installed Solr and Tomcat for years. Every now and then however, SOMETHING happens that blows up the installation of Solr/Tomcat.
I finally got tired of fixing it and thought to myself “MacPorts has all the other stuff that I need. Why not Solr?”
Here’s how to install Solr using MacPorts
- Start up Terminal
- Update MacPorts by entering: sudo port self update
- Install Solr: sudo port install apache-solr3
(this is version 3.6.2 of solr)
MacPorts will do its thing. Note that the ‘Jetty’ is being installed instead of Tomcat.
Install the new schema and server config files
- Download the files you need from the Community site. This is the ‘Enterprise Solr Integration’ file containing the ‘schema.xml’ file and the ‘solrconfig.xml’ file.
- Navigate to here:
- Backup the existing ‘schema.xml’ file and the ‘solrconfig.xml’ files and then replace them with the ones you downloaded.
- Start Terminal
- Type in the command: sudo solr3
Solr should start. To see if it is working navigate to this URL:
In the Terminal window you started Solr in type ‘control-c’ where ‘control’ is the KEY on the keyboard and not the word.
Enterprise and Solr
Make sure to go into Enterprise’s ‘config_solr’ file and check the port that is entered at the top of the file. Make sure it matches the one that you are using with Solr.
If you have a pre-determined port you are using and the default doesn’t match the one you want to use then you’ll need to change the port that ‘Jetty’ is using.
Changing the Jetty Port
Navigate to this file:
Open the file in text editor
Search for ‘jetty.port’. This line should come up:
Change the value of 8983 to the appropriate value
Save the file and restart Solr.