java - Java Servlet 容器在哪里

标签 java servlets solr lucene

我已经安装了 JRE,现在我尝试按照 Solr Reference Guide 安装 Solr .

指南规定:

  1. Stop your Java servlet container.
  2. Copy the solr.war file from the Solr distribution to the webapps directory of your servlet container...

  3. Start your servlet container, passing to it the location of your Solr Home in one of these ways:

  • Set the Java system property solr.solr.home to your Solr Home. (for example, using the example jetty setup: java -Dsolr.solr.home=/some/dir -jar start.jar).
  • Configure the servlet container so that a JNDI lookup of java:comp/env/solr/home by the Solr webapp will point to your Solr Home.
  • Start the servlet container in the directory containing ./solr: the default Solr Home is solr under the JVM's current working directory ($CWD/solr).

问题:

  1. 在哪里可以找到这个 Java Servlet 容器?
  2. 在哪里/如何执行这些命令来启动/停止/配置 Java Servlet 容器?
  3. 如何设置 Java 系统属性?

最佳答案

我的方法非常简单。下载文件后,我将其解压到服务器上的一个文件夹中。我使用命令行完成安装。 使用命令行,导航到将文件提取到的 solr-X.XX.X 文件夹内的示例文件夹,然后运行 ​​java 命令:

cd C:/<folder>/app/solr-X.XX.X/example
    java -jar start.jar

它会像魔术一样为您执行安装。 您可以通过访问localhost:8983/solr来访问SOLR

虽然我使用的是 Windows Server,您的可能有所不同,但我想逻辑是相同的。

关于java - Java Servlet 容器在哪里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20470635/

相关文章:

java - 如何在以编程方式关闭时重新启动 Java 应用程序

java - getcookies() 空指针异常

javascript - 如何检测浏览器关闭?

java - `lucene 5.0.0` 的 SmartChineseAnalyzer 可以指定或添加我的自定义词典吗?

solr - Nutch 和 Solr 入门 : where's Solr's conf/directory?

solr - 太阳黑子 order_by 排序,nil 值排在最后

java - 发生了 JNI 错误,我刚刚删除并重新安装了 jdk

java - 符合给定标准的 Scala/Java ORM

java - 在 "-"(indexOf)之后传入大写

java - 在 JavaScript 中使用 context-param 的最佳方式是什么