Installation of Solr for full-text search purpose

本文提供了一步一步的指导来帮助读者安装并配置Solr搜索引擎。内容包括Tomcat服务器的安装、设置环境变量、启动Tomcat服务器以及Solr的安装步骤等。完成配置后,用户可以使用Solr为自己的项目构建搜索功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值