windows下使用solr--安装

2019-03-27 01:20|来源: 网路

1.分别下载jetty-6.0.2和solr-3.6.1
http://mirror.mel.bkb.net.au/pub/apache/lucene/solr/3.6.1/apache-solr-3.6.1.tgz

http://dist.codehaus.org/jetty/jetty-6.0.x/jetty-6.0.2.zip
2.安装jetty
解压jetty-6.0.2至E:\Program Files\jetty6。
解压apache-solr-3.6.1\dist\apache-solr-3.6.1.war 重新命名为solr,并将solr放入E:\Program Files\jetty6\webapps目录下 。
将apache-solr-3.6.1\example\solr拷贝至E:\Program Files\jetty6\webapps\solr目录下并重新命名为bbs
3.将E:\Program Files\jetty6\webapps\solr\bbs\solr.xml移动到上一级目录,即E:\Program Files\jetty6\webapps\solr\目录下
内容修改如下:

<?xml version="1.0" encoding="UTF-8" ?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<!--
   This is an example of a simple "solr.xml" file for configuring one or 
   more Solr Cores, as well as allowing Cores to be added, removed, and 
   reloaded via HTTP requests.

   More information about options available in this configuration file, 
   and Solr Core administration can be found online:
   http://wiki.apache.org/solr/CoreAdmin
-->

<!--
 All (relative) paths are relative to the installation path
  
  persistent: Save changes made via the API to this file
  sharedLib: path to a lib directory that will be shared across all cores
-->
<solr persistent="false">

  <!--
  adminPath: RequestHandler path to manage cores.  
    If 'null' (or absent), cores will not be manageable via request handler
  -->
  <cores adminPath="/admin/cores">
    <core name="bbs" instanceDir="bbs" />
  </cores>
</solr>

修改bbs\conf\schema.xml对应的name为bbs
修改bbs\conf\solrconfig.xml里索引数据存放的位置为<dataDir>${solr.data.dir:F:\solr\bbs}</dataDir> 
4.启动jetty
cmd进入 E:\Program Files\jetty6 目录,执行
java -Dsolr.solr.home="E:\Program Files\jetty6\webapps\solr" -jar start.jar

然后在浏览器里输入 http://localhost:8080/solr/,你会看到Admin_bbs了,并且在bbs接口数据文件f:\solr\bbs下生成index和spellchecker两个文件夹
Admin_bbs



转自:http://my.oschina.net/u/568279/blog/75550

相关问答

更多
  • 1、安装libssh2扩展 带dll的就是windows用的。 根据自己的环境选择安装包。 这里选择的是5.5 Thread Safe (TS) x64 解压完后,会有三个文件,libssh2.dll、php_ssh.dll、php_ssh2.pdb。 将 php_ssh.dll、php_ssh2.pdb 放到你的 php 扩展目录下 php/ext/ 下。 将libssh2.dll 复制到 c:/windows/system32 和 c:/windows/syswow64 各一份 php.ini中加入 e ...
  • Tomcat下Solr安装配置 由于Solr基于java开发,因此Solr在windows及Linux都能较好部署使用,但由于Solr提供了一些用于测试及管理、维护较为方便的shell脚本,因此在生产部署时候建议安装在Linux上,测试时候可以在windows使用。 Solr是一个基于Lucene的Java搜索引擎服务器。Solr 提供了层面搜索、命中醒目显示并且支持多种输出格式(包括 XML/XSLT 和 JSON 格式)。它易于安装和配置,而且附带了一个基于 HTTP 的管理界面。Solr 创建的索引与 ...
  • Tomcat下Solr安装配置   由于Solr基于java开发,因此Solr在windows及Linux都能较好部署使用,但由于Solr提供了一些用于测试及管理、维护较为方便的shell脚本,因此在生产部署时候建议安装在Linux上,测试时候可以在windows使用。   Solr是一个基于Lucene的Java搜索引擎服务器。Solr 提供了层面搜索、命中醒目显示并且支持多种输出格式(包括 XML/XSLT 和 JSON 格式)。它易于安装和配置,而且附带了一个基于 HTTP 的管理界面。Solr 创建 ...
  • 如果您尝试自行下载存档,则需要安装phpize。 如果您安装了phpize ,请手动执行此操作: pecl download solr-beta tar xvzf solr-2.0.0.tgz cd solr-2.0.0 phpize ./configure make sudo make install # add extension=solr.so to your php.ini / distribution extension loader ..这应该与pecl install solr-beta , ...
  • 好吧,那很简单...我只是忘了将-f标志放入NSSM配置中 start -f -p 8991 -m 1g NSSM需要服务在前台运行,以便它可以成功停止,等等。 Well, that was easy... I just forgot to put the -f flag into the NSSM configs start -f -p 8991 -m 1g NSSM needs the service to be running in foreground so that it can stop it ...
  • 我会建议遵循官方指南 ,它有相当多的细节。 关于Tomcat的东西,它并没有过时,推荐的方法是在Jetty上运行Solr。 关于随时将Solr作为服务运行, 如果您正在运行Windows,则可以通过运行bin\solr.cmd来启动Solr。这将在后台启动Solr,并监听端口8983。 有关如何启动Solr的更多示例 - https://lucene.apache.org/solr/guide/7_2/solr-control-script-reference.html#starting-and-stopp ...
  • 如果您在Ubuntu服务器上的Tomcat中运行Solr,并且已经将Solr WAR部署到/webapps文件夹/webapps 。 然后,根据Solr Wiki上的Lucene / Solr 4 Spatial文档,您只需将JTS distribution /lib文件夹中的所有jar文件复制到运行Solr的WEB-INF/lib文件夹。 更新 由于您使用Jetty运行Solr,因此您需要将JTS jar文件的位置包含为类路径。 基于Clas ...
  • 它正在使用Jetty,但未来可能不会(因为当您不必考虑围绕您的服务的webapp框架时,有很多事情变得更容易实现)。 这就是为什么5.0明确支持在现有容器中运行(它仍然可以完成 - 但你是独立的,功能可能会中断)。 至少现在可以假定应用程序的环境是某个容器并具有特定的功能集。 It's using Jetty, but it might not in the future (as there are quite a few things that gets easier to implement when ...
  • 这不再是受支持的配置。 因此,即使它有效,也可能会出现问题。 强烈建议使用Solr自带的服务器解决方案。 This is no longer a supported configuration. So, even if it worked, there might be issues later. The strong recommendation is to use the server solution that Solr comes with out of the box.
  • 当您以Solr用户身份运行时,必须让solr用户访问您要编写配置的目录。 如果这是/opt/solr ,则可以通过发出chown命令递归地更改目录的所有者和所有包含的文件: chown -R solr.solr /opt/solr 这假设您的系统上还有一个名为solr的组。 如果您没有solr组,请使用另一个合适的组,或将最后一个.solr保留在命令之外。 When you're running as the Solr user, you'll have to give the solr user acc ...