Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Solr+tomcat integration

Shulou Source: shulou.com Published: 2022-06-03 07:59:47 09月23日 Update

1. Solr installation

Http://archive.apache.org/dist/lucene/solr/

There are various versions of this address.

This time I am using version 5.5.4 and tomcat8

Version 5.5.4 is built-in and jetty can be run directly.

Run directly as follows

Start the service with the solr start command

If you see this sentence, it means the startup is successful.

Access http://localhost:8983/solr/#/ directly after startup

II. Integration with tomcat8

1. Rename the server/solr-webapp/webapps in the solr5.5 directory to solr and place it in the tomcat/webapp directory.

The figure below is as follows

two。 Copy the jar package under solr-5.5.4\ server\ lib\ ext to webapps\ solr\ WEB-INF\ lib in tomcat.

The figure below is as follows

3. Copy log4j.proproperties from the solr directory to the tomcat directory

3.1 create a classes folder at this location and throw the log files in

4. Create solrhome and put the solr file in solr5.5.4 into solrhome (you can skip this step directly, but the following steps need to be modified)

5. Modify the solr\ home path in web.xml

This paragraph is commented out. You need to remove the comments and configure the direct solrhome location (if you have not created a solrhome before, you can directly locate the solr in solr5.5.4\ server).

6. Start the tomcat test

Http://localhost:8000/solr/admin.html#/

The higher version accesses index.html because there is no admin.html in it.

Port mine is 8000. Pay attention to this.

The test succeeded

7. Create Core

Create a core under the solr_home\ solr directory

7.2 copy the config from the following location into the core directory

7.3 create an empty data folder

7.4 add Core

The effect of adding success is as follows

At this point, my first blog is over. If there are any inadequacies and mistakes, please give me your advice.

Thank you!

Tags: Directory file version success location content copy folder comment test run integrate step-by-step blog command address place effect log basic Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Redmi Docker Apple Microsoft