This article transferred from: http://blog.csdn.net/lianghyan/article/details/49467207
SOLR Download: http://lucene.apache.org/solr/downloads.html (http://www.apache.org/dyn/closer.lua/lucene/solr/5.3.1)
1. Unzip the Solr-5.3.1.zip to D:\dev\solr-5.3.1
2. Copy D:\dev\solr-5.3.1\server\solr-webapp\webapp all contents to D:\dev\solrwebapp
3. Copy D:\dev\solr-5.3.1\server\lib\ext jar package to D:\dev\solrwebapp\WEB-INF\lib
4. Create a directory D:\dev\solrhome, copy the contents of the D:\DEV\SOLR-5.3.1\SERVER\SOLR directory to D:\dev\solrhome
5. Modify D:\dev\solrwebapp\WEB-INF\web.xml
<env-entry> <env-entry-name>solr/home</env-entry-name> <env-entry-value>D:/dev/solrhome</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> |
6. Modify D:\dev\apache-tomcat-8.0.3\conf\server.xml, add in Host
<context path= "/SOLR" docbase= "D:/dev/solrwebapp" debug= "0" crosscontext= "true"/> |
7. Launch Tomcat, enter URL:HTTP://LOCALHOST:8080/SOLR in the browser
Reference: jingyan.baidu.com/article/d8072ac4625b07ec95cefdbe.html
-------------------------------------------------------------------------------------------------------------
8. Under the D:\dev\solrhome directory, create a directory lyfirstcore, copy D:\dev\solrhome\configsets\basic_configs\con to D:\dev\solrhome\ Lyfirstcore\conf under
9. In the D:\dev\solrhome directory, create the file core.properties, and edit the file
10. Visit the page HTTP://LOCALHOST:8080/SOLR, view core Admin, ' Lyfirstcore ' is displayed
--------------------------------------------------------------------------------------------------------------- -----
11. Create a new index
Java-classpath D:/dev/solr-5.3.1/dist/solr-core-5.3.1.jar-dport=8080-dauto=yes-dc=lyfirstcore-ddata=files- Drecursive=yes Org.apache.solr.util.SimplePostTool d:/dev/solr-5.3.1/docs/
Deploy SOLR 5.3.1 under "Go" tomcat