M
M
Max Maximov2017-10-18 08:34:03
Java
Max Maximov, 2017-10-18 08:34:03

How to install Apache Solr on Apache Tomcat?

Greetings!
Intro: we need to implement a full-text, scalable and powerful search engine into the project - chose Solr (latest version 7.1).
I read and looked. Looks like you got the configuration right.
Situation: But now the question is about uploading to production. The Solr package itself comes in a Jetty container, now it does not provide .war files separately. There are no new tutorials describing installation in Tomcat.

Beginning with Solr 5.0, Solr is no longer distributed as a "war" (Web Application Archive) suitable for deployment in any Servlet Container. Solr is now distributed as a stand alone java server application, including start and stop scripts for use on Unix and MS-Windows platforms, as well as an installation script for setting up a "production" installation of Solr on *nix platforms managed via / etc/init.d. See https://wiki.apache.org/solr/WhyNoWar

No blog, tutorial or documentation on the web is suitable for the new versions of Solr (7.1) and Tomcat (9). For a week I can not find anything sensible, I searched everywhere. Shamanism with unloading also does not give results. (By the way, I am a .NET developer, I worked on java (and related technologies) only at the university when I was a student. In general, I only worked on the .net stack).
Problem: I can't properly deploy Solr to Tomcat. In books on Solr (released a couple of years ago), I read that for production it is necessary to deploy in Tomcat, and Jetty should be used only for local development and testing. But this was not substantiated.
Hence the unwitting conclusion -> if the Solr developers themselves first shoved everything into jetty, and now they have generally removed the ability to shove it into other containers, maybe this is how it was intended? let it stand in the jetty? Some (not so old) blogs on Habré also write that jetty is not bad at all, in some places even better than Tomcat.
Question: I need instructions for deploying Solr (7.1) to Tomcat (9). Or the answer why you should not do this and it is better to deploy the native package in Jetty - and hence the question is different - how to deploy the native package in jetty as a service in Windows Server 2012.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
al_gon, 2017-10-19
@maximka19

Why not run Solr as a service on Windows Server 2012 via a startup BAT file.
No one forbids the same as here https://stackoverflow.com/questions/37695425/windo... or add to the service register. ( https://nssm.cc/ )
If you don't have a script running under Windows, you can look towards Solr Bitnami to get started.
As a result, you will have to somehow change, adjust to your needs, but still.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question