A detailed tutorial on how to build the SOLR service on Linux

Source: Internet
Author: User
Tags solr

First, the system environment

NOTE: Welcome to reprint, non-commercial use please note in the prominent position of this article link and author name dijia478 can, commercial use please contact me [email protected].

Centos-6.7-i386-bin-dvd1

jdk-8u151-linux-i586

Apache-tomcat-8.5.24.tar

solr-7.1.0

Note: solr6.0 above, the official recommended to use JDK8,TOMCAT8. Slightly different from the SOLR4 deployment process

Second, the first step of building step: upload and unzip SOLR

Step two: Upload and unzip Tomcat, copy one out

I've already unpacked it here.

I'll switch to the root user, then create the SOLR directory and rename the tomcat copy to/usr/local/solr/tomcat.

Step three: Deploy SOLR under Tomcat

Note that this is because I am using the latest version of solr7.1, so with many SOLR4 on the Web to copy *.war files, and then start the operation of Tomcat decompression is not the same. (This is the right way to decompress)

Copy and rename the Server/solr-webapp/webapp folder in the SOLR directory to/USR/LOCAL/SOLR/TOMCAT/WEBAPPS/SOLR

Fourth step: Put the section under the server/lib/directoryJarPackage, added to theSOLRThe project.

All jars under server/lib/ext/are copied to/usr/local/solr/tomcat/webapps/solr/web-inf/lib/, which are log-related jar packages

server/lib/metrics* 5 jars starting with/usr/local/solr/tomcat/webapps/solr/web-inf/lib/(SOLR4 deployment without this)

Fifth step: Add the Log4j.properties in the server/resources/directory to the SOLR project that you just deployed

Note To create a classes directory (SOLR4 deployment does not have a fifth step)

Sixth step: Create a Solrhome

Copy the SERVIER/SOLR directory to the previously created SOLR directory, rename it to Solrhome, and now there are two folders in the/USR/LOCAL/SOLR directory.

Seventh step: Associating SOLR and Solrhome

Need to modify the Web. XML file in Tomcat's SOLR project

Find this, is annotated, need to modify the value of the item

Open the comment and modify the Solrhome directory you created above

Then to the bottom, the paragraph commented out, or will be reported 403 error, the completion of the Save exit (SOLR4 deployment do not note this)

Eighth step: Start Tomcat

Go to your own computer to access the SOLR service under the server

Note the access address, direct access to the 192.168.25.128:8080/SOLR will be reported 404, need to add/index.xml in the back

If the following page appears, the SOLR service setup is ok.

If you want to close the SOLR service, you can turn off Tomcat directly.

A detailed tutorial on how to build the SOLR service on Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.