Skip to main content

Local Install of Solr for Sitecore 9

One of the pre-requisites of installing Sitecore 9 locally is Solr. For my local Sitecore 9.2 installation I had to install Solr 7.5.0. I found many articles online and especially found this one useful.

Here are the 3 steps I following to install Solr 7.5.0 locally

Step 1:
Install java from the oracle website. After the installation, assuming that you have installed java 13.0.1, add the following Path environment variable (shown as #2 in below image)
C:\Program Files\Java\jdk-13.0.1\bin

To verify, open the cmd prompt and run the command "java -version"
You should get something like the following if it is installed correctly.

Step 2:
Install JRE locally. I installed it from the cnet website. After the installation, assuming that you have installed jre 1.8.0_221 set the JAVA_HOME environment variable (sown as #3) to:
C:\Program Files (x86)\Java\jre1.8.0_221

Step 3:
Open powershell as admin. If you haven't done so before, run the command
"Set-ExecutionPolicy Unrestricted"

Download this ps1 file and go to the folder you downloaded it to. Assuming that is  "C:\Installs\Sitecore 9.2", run the ps1 from there as follows

That's it. If all is successful your solr instance should auto load with the url

Happy Sitecoreing!


Popular posts from this blog

Using Okta Authentication for a Sitecore client site

I recently had a project where we had to add a new Sitecore site to an already multi site Sitecore 8.2 Update 7 instance. This new site had to integrate with Okta to manage user authentication. I found many articles online that integrated Okta and Sitecore's admin interface but I could not find one that just integrated Okta with a client Sitecore site. My first step was to use Okta's available ASP.NET MVC projects on their Dev site and test them out. This worked very well with the first Authenticated method I tried which was WS-Fed. But when I tried to use the same authentication method with a site in Sitecore I got errors in my logs like the following: Sitecore.Security.Principal.SitecoreIdentity does not contain a definition for Claims Claims are available in HttpContext.User.Identity but not in Sitecore.Security.Principal.SitecoreIdentity, and since we are using a Sitecore site we could not read the claims. I tried to make claims work in Sitecore using various online a

Un Lock Sitecore admin account

There are times when you - Upgrade Sitecore locally - Restore databases in your local Sitecore instance. And you are no longer able to login to the Sitecore admin interface with the default admin username and password b. When this happens you can unlock the Sitecore admin account and reset the password back to b. To do this copy this aspx  file to your Website\sitecore\admin folder (and overwrite existing file) Next make sure your local web.config (in the root Website) folder has the following settings minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" Lastly go to the following page And click the Unlock Administrator button. That's it, you can now login to your local Sitecore instance. Happy Sitecoreing!

Async Task .Result or .Wait() not working in MVC web application

I had a piece of async code that worked as a console application in Visual Studio 2015. I had to move this code into my MVC web application. In the code, basically you pass an ID to an Api and it returns a document corresponding to that ID. The issue was, there needed to be 2 calls to the Api. As part of the first call you pass the ID and the Api returned a filename. You then pass the filename to the second call and it returns the corresponding document. This worked fine in a console application. But when I tried to port it into a MVC web application it did not work. Frankly async calls work fine in MVC applications, but in instances like mine, I needed the code to be synchronous, since the second call to the Api should only start after the first call returns valid data. I even tried to make the code synchronous, but this just caused my application to hang at the .Result line (code below) ORIGINAL CODE: var fileName = await obj.PostAsync(); await obj.DownloadFile("fileId=&