Translate

SOLR 7.2.1 Installation Guide with SSL for Sitecore

This article is a walk-through of Solr 7.2.1 installation with SSL as a window service.
So let’s start.

Prerequisites

     1)    Download SOLR 7.2.1 and unzip it into a folder (example : F:\solr-7.2.1)

     2)    Download NSSM 2.24 and unzip into a folder (example: F:\NSSM)

     3)    Check JRE if installed or not, if not than install it

Generate certificate for SOLR
I refer https://lucene.apache.org/solr/guide/7_2/enabling-ssl.html website to generate the certificate

You can generate the certificate by following below steps:

     1)    Open command prompt as an administrator and navigate to the path

       C:\Program Files (x86)\Java\jre1.8.0_211\bin

     2)    Now run following command and you can change the keypass, storepass, CN, OU and other attributes

keytool.exe -genkeypair -alias solr-ssl -keyalg RSA -keysize 2048 -keypass secret -storepass secret -validity 9999 -keystore solr-ssl.keystore.jks -ext SAN=DNS:localhost,IP:127.0.0.1 -dname “CN=localhost, OU=Organizational Unit, O=Organization, L=Location, ST=State, C=Country”

The above command will create a keystore file named solr-ssl.keystore.jks in the current directory.

     3)    Run following command from command prompt to Convert solr-ssl.keystore.jks key to PEM format

keytool.exe  -importkeystore -srckeystore solr-ssl.keystore.jks -destkeystore solr-ssl.keystore.p12 -srcstoretype jks -deststoretype pkcs12

The keytool application will ask you to create a destination keystore password and for the source keystore password ("secret" in the example shown above or which was set when creating the keystore).

This will generate “solr-ssl.keystore.p12” certificate in the current directory

Install Certificate for SOLR

1) Now for installation this certificate, double click on the generated certificate file(solr-       ssl.keystore.p12”). it will prompt you a certificate import wizard.


Click next and then next it will ask you the password (type: secret into that) and then   Browse Trusted Root Certification Authorities.


2)    Copy the generated certificate and keystore files (solr-ssl.keystore.jks, solr-ssl.keystore.p12) into your extracted solr folder F:\solr-7.2.1\solr-7.2.1\server\etc

3) Now open solr.in.cmd file in notepad or notepad++ (F:\solr-7.2.1\solr-7.2.1\bin) and uncomment following properties


Install SOLR as a Window service

1)  Navigate to nssm folder in command prompt, In my case it is ( F:\NSSM) and              type  nssm.exe install solr7.2.1


2)    It will pop up the NSSM service installer window.
     a.    Set application path to solr.cmd
     b.    Set startup directory if not automatically set
     c.    Type “start –f –p 8984” into the Arguments box
     d.    You can change the service name if you want and then click on the Install service                   button


3)    Now open Windows service Manager and start service solr7.2.1.




Now solr7.2.1 is installed on your machine but to be sure browse following url



No comments:

Post a Comment