English 中文(简体)
Apache Solr - Windows Environment
  • 时间:2024-12-22

Apache Solr - On Windows Environment


Previous Page Next Page  

In this chapter, we will discuss how to set up Solr in Windows environment. To install Solr on your Windows system, you need to follow the steps given below −

    Visit the homepage of Apache Solr and cpck the download button.

    Select one of the mirrors to get an index of Apache Solr. From there download the file named Solr-6.2.0.zip.

    Move the file from the downloads folder to the required directory and unzip it.

Suppose you downloaded the Solr fie and extracted it in onto the C drive. In such case, you can start Solr as shown in the following screenshot.

Solr File in C Drive

To verify the installation, use the following URL in your browser.

http://localhost:8983/

If the installation process is successful, then you will get to see the dashboard of the Apache Solr user interface as shown below.

Solr Admin

Setting Java Environment

We can also communicate with Apache Solr using Java pbraries; but before accessing Solr using Java API, you need to set the classpath for those pbraries.

Setting the Classpath

Set the classpath to Solr pbraries in the .bashrc file. Open .bashrc in any of the editors as shown below.

$ gedit ~/.bashrc

Set classpath for Solr pbraries (pb folder in HBase) as shown below.

export CLASSPATH = $CLASSPATH://home/hadoop/Solr/pb/*

This is to prevent the “class not found” exception while accessing the HBase using Java API.

Advertisements