/*! \page install_solr Install and Configure Solr A central Solr server is needed to store keyword indexes. To install Solr, perform the following steps: \section install_solr_prereq Prerequisites You will need: - 64-bit version of the Java Runtime Environment (JRE) from http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html. - Download the Apache Solr 4.10.3-0 installation package from https://bitnami.com/stack/solr/installer. - Access to an installed version of Autopsy so that you can copy files from it. \section install_solr_install Installation \subsection install_solr_install_java JRE Installation Install the Java JRE if needed. You can test this by running _where java_ from the command line. If you see output like the yellow results below, you have a JRE.

\image html wherejava.PNG

If you need the JRE, install it with the default settings. \subsection install_solr_install_solr Solr Installation The following steps will configure Solr to run using an account that will have access to the network storage. 1. Run the Bitnami installer, bitnami-solr-4.10.3-0-windows-installer.exe 2. If Windows prompts with User Account Control, click _Yes_ 3. Follow the prompts through to completion. You do not need to "Learn more about Bitnami cloud hosting" so you can clear the check box. 4. If you see an error dialog like the following, you may safely ignore it.

\image html apachebadmessage.PNG
5. When the installation completes, clear the "Launch Bitnami Apache Solr Stack Now?" checkbox and click _Finish_. \subsection install_solr_config Solr Configuration 1. Stop _solrApache_ and _solrJetty_ services by pressing _Start_, typing _services.msc_, pressing _Enter_, and locating the _solrApache_ and _solrJetty_ Windows services. Select the services one at a time, and press _Stop the service_ once for each of them. If the service is already stopped and there is no _Stop the service_ available, this is okay. 2. Edit the C:\\Bitnami\\solr-4.10.3-0\\apache-solr\\scripts\\serviceinstall.bat script. You need administrator permission to change this file. The easiest way around this is to save a copy on the Desktop, edit the Desktop version, and copy the new one back over the top of the old. Windows will ask for permission to overwrite the old file; allow it. You should make the following changes to this file:

- Add the following options in the _JvmOptions_ section of the line that begins with "C:\Bitnami\solr-4.10.3-0/apache-solr\scripts\prunsrv.exe" : + ++JvmOptions=-DzkRun + ++JvmOptions=-Dcollection.configName=AutopsyConfig + ++JvmOptions=-Dbootstrap_confdir="C:\Bitnami\solr-4.10.3-0\apache-solr\solr\configsets\AutopsyConfig\conf" - Replace the path to JavaHome with the path to your 64-bit version of the JRE. If you do not know the path, the correct _JavaHome_ path can be obtained by running the command "where java" from the Windows command line. An example is shown below. The text in yellow is what we are interested in. Do not include the "bin" folder in the path you place into the _JavaHome_ variable. A correct example of the final result will look something like this:   --JavaHome="C:\Program Files\Java\jre1.8.0_45"

\image html wherejava.PNG

Note that if you get something like the following when running the "where java" command, it is a symbolic link to the Java installation and you need to trace it to the proper folder as explained below.

\image html symlinkjava.PNG

To trace a symbolic link to the proper folder, use Windows Explorer to navigate to the path shown (C:\\ProgramData\\Oracle\\Java\\javapath for the example above), then right click on _java.exe_ and Click on _Properties_. You will see the path you should use in the _Target_ field, shown in the screenshot below. Do not include the "bin" folder in the path you place into the _JavaHome_ variable.

\image html javaproperties.PNG

A fully updated _serviceinstall.bat_ is shown below, with the changes marked in yellow.

\image html updatedServiceInstall.PNG

3. Edit "C:\Bitnami\solr-4.10.3-0\apache-solr\solr\solr.xml" to set the _transientCacheSize_ to the maximum number of cases expected to be open concurrently. If you expect ten concurrent cases, the text to add is \10\

The added part is highlighted in yellow below. Ensure that it is inside the \ tag as follows:
\image html transientcache.PNG
Again you may have trouble saving to the file in the current location. If so, just save it out to the desktop and copy the edited file back over the top of the original.

4. Edit "C:\Bitnami\solr-4.10.3-0\apache-solr\resources/log4j.properties" to configure Solr log settings: - Increase the log rotation size threshold (_log4j\.appender\.file\.MaxFileSize_) from 4MB to 100MB. - Remove the _CONSOLE_ appender from the _log4j\.rootLogger_ line.

The log file should end up looking like this (modified lines are highlighted in yellow):

\image html log4j.PNG

5. Edit the file "C:\Bitnami\solr-4.10.3-0\apache-solr\solr\zoo.cfg" to increase the _tickTime_ value to 15000 as shown in the screenshot below.

\image html tickTime.PNG

6. Edit the file "C:\Bitnami\solr-4.10.3-0\apache-solr\solr\zoo.cfg" to set the value dataDir=C:/Bitnami/zookeeper as shown in the screenshot below.

\image html dataDir.PNG

7. From an Autopsy installation, copy the folder "C:\Program Files\Autopsy-4.0\autopsy\solr\solr\configsets" to "C:\Bitnami\solr-4.10.3-0\apache-solr\solr". 8. From an Autopsy installation, copy the folder "C:\Program Files\Autopsy-4.0\autopsy\solr\solr\lib" to "C:\Bitnami\solr-4.10.3-0\apache-solr\solr". 9. Right-click on the file "C:\Bitnami\solr-4.10.3-0\apache-solr\scripts\serviceinstall.bat" and click "Run As Administrator", selecting _Yes_ if prompted by User Account Control. If there is no "Run as administrator" option when you right-click the _serviceinstall.bat_ file, start a Windows command prompt as administrator by pressing _Start_, typing _command_, right clicking on _Command Prompt_, and clicking on _Run as administrator_. Then run the following command to install the _solrJetty_ service:

cmd /c C:\\Bitnami\\solr-4.10.3-0\\apache-solr\\scripts\\serviceinstall.bat INSTALL

Your command prompt should look like the screenshot below. Very likely it will say "The solrJetty service could not be started." This is okay.

\image html solrinstall1.PNG

10. Press _Start_, type _services.msc_, and press _Enter_. Find _solrJetty_. If the service is running, press _Stop the service_, then double click it, and switch to the _Log On_ tab to change the logon credentials to a user who will have access to read and write the primary shared drive. If the machine is on a domain, the Account Name will be in the form of _DOMAINNAME\\username_ as shown in the example below. Note that in the screenshot below, the domain name is _DOMAIN_ and the user name is _username_. These are just examples, not real values.

\image html solrinstall2.PNG
If the machine is on a domain, **make sure** to select the domain with the mouse by going to the _Log On_ tab, clicking _Browse_, then clicking _Locations_ and selecting the domain of interest. Then enter the user name desired and press _Check Names_. When that completes, press _OK_, type in the password once for each box and press _OK_. You may see "The user has been granted the log on as a service right." 11. You should be able to see the Solr service in a web browser via the URL http://localhost:8983/solr/#/ as shown in the screenshot below.

\image html solrinstall3.PNG

If the service is appropriately started and you are unable to see the screenshot above, contact your network administrator to open ports in the firewall.

*/