Install and configure Solr 7.2 in the latest version

Source: Internet
Author: User

Install and configure Solr 7.2 in the latest version

Solr is an independent enterprise-level search application server that provides APIs similar to Web-service. You can submit an XML file of a certain format to the search engine server through an http request to generate an index. You can also submit a search request through the Http Get operation and obtain the returned results in XML format.

Solr is a high-performance full-text search server developed by Java 5 and based on Lucene. At the same time, it is expanded to provide a richer query language than Lucene, and at the same time, it is configurable and scalable, and the query performance is optimized, it also provides a complete functional management interface and is a very good full-text search engine.

Required software:

1. Install jdk

Upload jdk, create a directory, decompress jdk, and configure Environment Variables

[Root @ node004 ~] # Mkdir-p/usr/local/java
[Root @ node004 ~] # Tar axvf jdk-8u111-linux-x64.tar.gz-C/usr/local/java/

 

[Root @ node004 ~] # Vi/etc/profile

     79 export JAVA_HOME=/usr/local/java/jdk1.8.0_111     80 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar     81 export PATH=$PATH:$JAVA_HOME/bin

[Root @ node004 ~] # Source/etc/profile
[Root @ node004 ~] # Java-version
Java version "1.8.0 _ 111"
Java (TM) SE Runtime Environment (build 1.8.0 _ 111-b14)
Java HotSpot (TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

[Root @ node004 ~] # Jps
Jps 2108

2. install tomcat

[Root @ node004 ~] # Mkdir-p/usr/local/solr
[Root @ node004 ~] # Tar zxvf apache-tomcat-8.5.24.tar.gz-C/usr/local/solr/

3. Install Solr3.1 and create Solr-home, log directory

[Root @ node004 ~] # Mkdir-p/usr/local/solr/home
[Root @ node004 ~] # Mkdir-p/usr/local/solr/logs

3.2 decompress the Solr package

[Root @ node004 ~] # Tar zxvf solr-7.2.0.tgz

3.3 copy the Solr web application to the tomcat/webapps directory.

[Root @ node004 ~] # Cp-rf/root/solr-7.2.0/server/solr-webapp/usr/local/solr/apache-tomcat-8.5.24/webapps/solr

3.4 copy the jar package

[Root @ node004 ~] # Cp/root/solr-7.2.0/server/lib/ext/*. jar/usr/local/solr/apache-tomcat-8.5.24/webapps/solr/WEB-INF/lib
[Root @ node004 ~] # Cp/root/solr-7.2.0/server/lib/gmetric4j-1.0.7.jar/usr/local/solr/apache-tomcat-8.5.24/webapps/solr/WEB-INF/lib/
[Root @ node004 ~] # Cp/root/solr-7.2.0/server/lib/metrics-*. jar/usr/local/solr/apache-tomcat-8.5.24/webapps/solr/WEB-INF/lib/

3.5 copy log4j. properties

Create a classess directory

[Root @ node004 ~] # Mkdir-p/usr/local/solr/apache-tomcat-8.5.24/webapps/solr/WEB-INF/classes

Copy log4j. properties

[Root @ node004 ~] # Cp/root/solr-7.2.0/server/resources/log4j. properties/usr/local/solr/apache-tomcat-8.5.24/webapps/solr/WEB-INF/classes

3.6 modify tomcat/bin/catalina. sh to specify the log directory

[Root @ node004 ~] # Vi/usr/local/solr/apache-tomcat-8.5.24/bin/catalina. sh

249 JAVA_OPTS = "$ JAVA_OPTS $ JSSE_OPTS-Dsolr. log. dir =/usr/local/solr/logs"

3.7 create solr-home

[Root @ node004 ~] # Cp/root/solr-7.2.0/server/solr/*-rf/usr/local/solr/home

3.8 modify web. xml

Specify solr-home

[Root @ node004 ~] # Vi/usr/local/solr/apache-tomcat-8.5.24/webapps/solr/WEB-INF/web. xml

Comment Security Module

Visit solr Console

 

Related Article

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.