If you want to use Sitecore 9 you will have to install Solr locally on your PC. Installing Solr is fairly straight-forward, however, when running it with Sitecore there is one small caveat... Sitecore 9 REQUIRES that everything runs over SSL, regardless if it's in prod or your local dev box.
SSL certificates cost cash money. That means unless you want to fork out for your own certificate, you will need to create our own free self-signed certificate. If this sounds complicated, don't worry. Most of the process has been automated.
In this guide, you will learn how to install Solr and configure it to run it over HTTPS.
Where Do I Get The Files?
First, you can download Solr from the apache site here. When you install Solr with Sitecore you want to use version 6.6.2. For reference, you can find more information about Solr here, however, before reading that I suggest you follow an even easier approach that I'll share below.
How Do I Set Solr Up To Use HTTPS?
Luckily, we live in a digital age where people write blogs and share information. A guy called Jem Davies has written a PowerShell script that will install Solr and creates the self-signed certificate for you and registers it, which you can find here. For a better write up about the script, you can check out the full blog post here: here.
This script will automate most things for you, however, you will need to add in some specific settings based on your system's config, these being:
- $JREVersion - JRE version that you are using
- $JREPath - Path to Java on your PC
As you can guess, to get Solr up and running on your PC, you will need the Java JRE installed
To quickly get the version of Java you have installed, open up a command prompt 'cmd' and type, 'java -version'. If this command comes back with an error, head over here to install JRE.
For most people, the Java path on your file system will be 'C:\Program Files\Java'. I'd recommend that you quickly open your Java directory in file explorer to double-check. This is also another way you can check which versions of JRE you have installed. On my PC I have 'jre1.8.0_151' and 'jre-9.0.4'. I used the lower version as that one has been proved to work with Solr 6.62.
Also, don't forget to run the script in Admin mode!!!
How Do I Access Solr?
After running the PowerShell script, Solr should start automatically on port 8983, that can be accessed on this local URL:
If you are installing Sitecore 9, as long as your dashboard loads correctly, you can move onto installing Sitecore 9. The Sitecore Installation Framework will do the rest for you