These instructions have been deprecated and should not be implemented. Updated instructions will be available soon.

Before you start

There are two options available for installing Solr. Please review the documentation to determine which option best meets your needs.

This guide provides instructions for a basic distributed installation. If you are doing an advanced distributed installation, please follow the instructions in the Type 3 link above.

Note: It is recommended to copy and paste the code provided in these instructions.

1. Ensure that your machine meets the hardware and software requirements listed in the links above.

Note: Java must be installed before you begin the installation.

2. It is recommended to create the user asolr.

useradd -m asolr

3. Create a password for asolr.

passwd asolr

4. Become user asolr.

su - asolr

5. Download the package.

cd /home/asolr
wget http://alexandria.fairviewresearch.com/software/alexandria-solr-v2.1.2-standalone-distribution.tar.gz

6. When the download is complete, untar the file.

tar zxvf alexandria-solr-v2.1.2-standalone-distribution.tar.gz
cd /home/asolr/alexandria-solr-v2.1.2-standalone-distribution

7. Using a text editor, adjust solr-alexandria-vars. Confirm or set the following variables.

Variable

Value

Description

ALEXANDRIA_SOLR_PORT 8080The port Solr (Jetty) should listen on and accept requests.
ALEXANDRIA_SOLR_URLhttp://xxx.xxx.xxx.xxx:$ALEXANDRIA_SOLR_PORT/$ALEXANDRIA_SOLR_CONTEXTThe URL to configure collections. The IP address should be the local address of the server.
ALEXANDRIA_SOLR_JVM_MEM64gThis is the java heap setting. Generally speaking, you should allocate at least 64g. The exact amount should be approximately 80% of total memory.

8. Start Solr. Note that it may take 3-4 weeks to complete the initial indexing process.

./solrctl start

9. Edit the following URL to reflect your IP address: http://xxx.xxx.xxx.xxx:8080/alexandria-v2.1/old.html. You can now visit this address in your browser to see the Solr interface. 

10. On the server with Alexandria-Client-Tools installed, configure, enable and start the indexing service.

a) Edit /etc/alexandria.xml, set @base to IP/hostname of Solr installation.

  <index name="alexandria" base="http://xxx.xxx.xxx.xxx:8080/alexandria-v2.1">
    <cores>
      <core name="alexandria" desc="Full Alexandria Index" />
      <core name="alexandria-standard" desc="Full Alexandria Index" />
      <core name="alexandria-premium" desc="Full Alexandria Index" />
      <core name="alexandria-premium-plus" desc="Full Alexandria Index" />
    </cores>
  </index>

b) Enable and start service. If necessary, adjust the code to reflect the version you are using.

# Amazon
chkconfig aidxd
# CentOS 8 / RHEL 8
systemctl enable aidxd.service

# Amazon
service aidxd start
# CentOS 8 / RHEL 8
systemctl start aidxd.service

Note: You can check on the progress of the indexing process in two ways.

The Solr Administration User Interface

1. Visit the URL http://xxx.xxx.xxx.xxx:8080/alexandria-v2.1/old.html#/ (assuming you are on the same network as Solr or can access it). Edit the URL to reflect your IP address. This will bring you to the Dashboard.

2. Use the Core Selector drop down and choose 'alexandria'. From this page you can see various statistics such as:

Last Modified:
Num Docs:
Max Doc:
Heap Memory Usage:
Deleted Docs:
etc...

3. Num Docs represents the number of documents currently available in the index. To learn more about the Solr Administration User Interface, see https://lucene.apache.org/solr/guide/6_6/overview-of-the-solr-admin-ui.html.

The Solr API

1. Submit the following query to the Solr API. Edit the code to reflect your IP address.

$ wget -O- -q 'http://xxx.xxx.xxx.xxx:8080/alexandria-v2.1/alexandria/select?q=*:*&rows=0'

2. The result will show numFound, which is equivalent to Num Docs in the interface.

{
 "responseHeader":{
   "status":0,
   "QTime":9,
   "params":{
     "q":"*:*",
     "df":"text",
     "echoParams":"all",
     "indent":"true",
     "fl":"score,ucid",
     "start":"0",
     "rows":"0",
     "wt":"json"}},
 "response":{"numFound":0,"start":0,"maxScore":0.0,"docs":[]

 }}
Next Steps

Once Solr has been installed, proceed to Web Server Installation (if desired).

Further Reading

  • No labels