您的位置:首页 > 其它

Installation of Solr for full-text search purpose

2012-04-27 01:33 309 查看
A very good article to start with if you want to use solr for your search engine,

http://crazorsharp.blogspot.ca/2010/01/full-text-search-using-solr-lucene-and.html

Here are the quick steps for installation, assuming that the jre is already installed.

1.Installation tomcate web server

1.1 Download from http://mirror.csclub.uwaterloo.ca/apache/tomcat/tomcat-7/v7.0.27/bin/apache-tomcat-7.0.27-windows-x64.zip

1.2 Unzip the downloaded file to a folder c:\apache-tomcat-7.0,27

1.3 Set environment variables with setenv.bat containing following lines

set JRE_HOME=%ProgramFiles%\Java\jre7

set JAVA_OPTS=-Dsolr.solr.home=E:\Solr ( this line is for the solr installation below, if you run tomcat as window server, see below to add this line)

exit /b 0

1.4 Run tomcate server on command line

c:\apache-tomcat-7.0,27\bin> startup.bat

or Install tomcate as windows server

c:\apache-tomcat-7.0,27\bin> service.bat install

if you get "Access is denied", try to run the cmd as administrator, run tomcat7w.exe to start the server

1.5 Test the tomcat web server by browsing http://localhost:8080

2. Installation Solr

2.1 Download: http://apache.mirror.iweb.ca/lucene/solr/3.6.0/apache-solr-3.6.0.zip
2.2 Unzip the file to c:\apach-solr-3.6.0

2.3 Copy the dist/apache-solr-3.6.0.war to c:\apache-tomcat-7.0,27\webapps folder and rename it to solr.war

2.4 Create "solr home":

Copy the solr folder in c:\apach-solr-3.6.0\example to c:\solr

Add one line -Dsolr.solr.home=c:\solr in java options list box of the Java tab in the tomcate7w.exe window

2.5 Restart the tomcate server

Test by browsing http://localhost:8080/solr

Now you can config Solr server to index your content, and using SolrNet to write searching code for your project.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: