简体   繁体   中英

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. 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 version: 5.4.12
Wampserver version: 2.4

  1. First you need to make sure JAVA is installed on your windows machine; if not, make sure to download it from here 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/ )
  3. Extract downloaded Apache Solr archive (ie in 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]
  5. Launch Windows Command Prompt (to launch RUN press win+R on your keyboard, then type "cmd" without the quotes, and click OK)
  6. In Command Prompt window; change directory to Apache Solr example folder location, ie cd c:\\wamp\\apache-solr-4.0.0\\example\\
  7. Also, in Command Prompt; type the following command java -jar start.jar

    NOTE: Command Prompt should be kept open since Solr service is running. If you close it the service will stop.

  8. This will start jetty webserver and deploy Solr automatically

  9. Now you can access Solr GUI from browser by going to http://localhost:8983/solr

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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