Page tree
Skip to end of metadata
Go to start of metadata

Introduction

FileCloud advanced search uses Solr (an open source component) in the backend, for its search capabilities. Follow these steps to install and configure Solr with FileCloud, to enable advanced search.

Prerequisite

Before installing Solr, please ensure the system has JDK v1.7 or higher.

OSPrerequisite Installation
Linux

$ sudo apt-get install openjdk-7-jdk

WinDownload latest JDK from here and install it.

Step 1: Install Solr

Download Solr v5.3.1 from here.  Download zip or tar ball depending on the OS, on which FileCloud server is installed. Solr installation is nothing but unzipping/untarring the downloaded zip/tar.

OSSolr Installation
Linux

Unzip the downloaded tar ball solr-5.3.1.zip onto /opt directory.

user@/opt$ sudo unzip /tmp/solr-5.3.1.zip

WinUnzip the downloaded zip file solr-5.3.1.zip onto C:\FileCloud. Note: Any other directory can be used to install

Step 2: Start Solr

Use one of the following methods to start Solr, depending on your requirements.

  • Method 1: Solr comes with all necessary components to run it as a server. Start the Solr server by running the following command:
OSRunning Solr
Linux

cd /opt/solr-5.3.1/bin
user@/opt/solr-5.3.1/bin$ sudo ./solr start

WinC:\FileCloud\solr-5.3.1\bin\> solr start
  • Method 2Solr might contact external servers, if the uploaded documents have embedded external entities. To prevent this, please start Solr as follows:
OSRunning Solr
Linux

cd /opt/solr-5.3.1/bin
user@/opt/solr-5.3.1/bin$ sudo ./solr start -a "-DsocksProxyHost=127.0.0.1"

WinC:\FileCloud\solr-5.3.1\bin\> solr start -a "-DsocksProxyHost=127.0.0.1"

Note: In this method, we just specify localhost as a socks proxy, assuming localhost is not running any proxies. Now all outgoing http connections will be blocked.

Note: Please follow the instructions here to run Solr as service.

Optional 1: Restrict Solr To Localhost

By default, Solr is bound to listen for requests from all IP addresses. Sometimes admin might need to restrict this to only to localhost. To do this, edit the jetty-http.xml file. 

OSLocation of jetty-http.xml
Linux

/opt/solr-5.3.1/server/etc/jetty-http.xml

WinC:\FileCloud\solr-5.3.1\server\etc\jetty-http.xml

Look for the following line:

<Set name="host"><Property name="jetty.host"/></Set>

and change it to:

<Set name="host"><Property name="jetty.host" default="127.0.0.1" /></Set> 

Upon restarting, Solr will listen only at the localhost (127.0.0.1).

Optional 2: Stop Solr

If for some reason, Solr needs to be stopped, issue the following command:

OSRunning Solr
Linux

user@/opt/solr-5.3.1/bin$ sudo ./solr stop -all

WinC:\FileCloud\solr-5.3.1\bin\> solr stop -all
  • No labels