简体   繁体   English

在Windows WAMP Server上安装Apache Solr

[英]Installing Apache Solr on Windows WAMP Server

I tried to install Apache Solr on WAMP server (in Windows) and I succeeded but the problem was that I couldn't use the PHP Solr library on this environment. 我尝试在WAMP服务器上(在Windows中)安装Apache Solr,但成功了,但问题是我无法在这种环境下使用PHP Solr库。 The error I keep getting is: 我不断得到的错误是:

PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.12/ext/php_solr.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0.

I've downloaded, included and activated the dll file containing the PHP Solr library but this error keeps comming. 我已经下载,包含并激活了包含PHP Solr库的dll文件,但是此错误不断出现。

PHP version: 5.4.12 PHP版本:5.4.12
Wampserver version: 2.4 Wampserver版本:2.4

  1. First you need to make sure JAVA is installed on your windows machine; 首先,您需要确保Windows机器上已安装JAVA if not, make sure to download it from here https://www.java.com/en/download/ 如果不是,请确保从此处https://www.java.com/en/download/下载
  2. Download Apache Solr library from http://lucene.apache.org/solr/mirrors-solr-latest-redir.html (to download older version go to https://archive.apache.org/dist/lucene/solr/ ) http://lucene.apache.org/solr/mirrors-solr-latest-redir.html下载Apache Solr库(要下载旧版本,请访问https://archive.apache.org/dist/lucene/solr/
  3. Extract downloaded Apache Solr archive (ie in C:\\wamp\\apache-solr-4.0.0 ) 解压缩下载的Apache Solr存档(即在C:\\wamp\\apache-solr-4.0.0
  4. If you're setting up Solr to work with Drupal, you need to copy some additional files to C:\\wamp\\apache-solr-4.0.0\\example\\solr\\collection1 [optional] 如果您将Solr设置为与Drupal一起使用,则需要将一些其他文件复制到C:\\wamp\\apache-solr-4.0.0\\example\\solr\\collection1 [可选]
  5. Launch Windows Command Prompt (to launch RUN press win+R on your keyboard, then type "cmd" without the quotes, and click OK) 启动Windows命令提示符(要启动RUN,请在键盘上按win + R ,然后键入不带引号的“ cmd”,然后单击“确定”)。
  6. In Command Prompt window; 在命令提示符窗口中; change directory to Apache Solr example folder location, ie cd c:\\wamp\\apache-solr-4.0.0\\example\\ 将目录更改为Apache Solr示例文件夹位置,即cd c:\\wamp\\apache-solr-4.0.0\\example\\
  7. Also, in Command Prompt; 另外,在命令提示符下; type the following command java -jar start.jar 键入以下命令java -jar start.jar

    NOTE: Command Prompt should be kept open since Solr service is running. 注意:由于Solr服务正在运行,因此命令提示符应保持打开状态。 If you close it the service will stop. 如果关闭它,该服务将停止。

  8. This will start jetty webserver and deploy Solr automatically 这将启动码头网络服务器并自动部署Solr

  9. Now you can access Solr GUI from browser by going to http://localhost:8983/solr 现在,您可以转到http://localhost:8983/solr从浏览器访问Solr GUI

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM