Using SOLR to build an enterprise search platform--run SOLR

Source: Internet
Author: User
Tags solr

1, first download good solr, I use solr1.3,:
Windows version http://labs.xiaonei.com/apache-m ... ache-solr-1.3.0.zip
Linux version http://labs.xiaonei.com/apache-m ... ache-solr-1.3.0.tgz

2, ready to run the container, I use is tomcat6.0.20. If you are playing, you can also not be prepared specifically for easy, you just unzip the SOLR download package, locate the example folder, and then run Start.jar. Specific instructions: Java-jar Start.jar When doing the application, it is not recommended to use this method. This approach contains the jetty!

3, the use of Tomcat is not the focus of this article, if you have a problem, see the use of Tomcat. Unzip the Tomcat and copy the Apache-solr-1.3.0.war from the Dist folder below the SOLR package to the WebApps of Tomcat and rename it to Solr.war.

4, create a new Solr-tomcat folder, I was to set up this folder in the C packing directory, you can use the same way, you can not, where you decide. After setting up the folder, put it under the set up a SOLR folder and put all the files under the EXAMPLE/SOLR folder inside the SOLR package into SOLR.

5, The last step configuration solr.home, there can be three ways.

1) method based on the current path

This situation needs to be started in the c:/solr-tomcat/directory TOMCAT,SOLR find./SOLR, so you need to switch to c:/solr-tomcat/at boot time

2) based on environment variables
Windows establishes solr.home in environment variables with a value of C:/solr-tomcat

Linux adds the following environment variable in the current user's environment variable (. bash_profile) or in catalina.sh

Export java_opts= "$JAVA _OPTS-DSOLR.SOLR.HOME=/OPT/SOLR-TOMCAT/SOLR"

3) based on Jndi

Create the Catalina folder in the Tomcat Conf folder, and then in the Catalina folder, create a localhost folder under which Solr.xml is created, with the contents:

XML code

<ContextDocBase= "C:/tomcat/webapps/solr.war"Debug= "0"Crosscontext= "true"   >       <Environmentname= "Solr/home"type= "Java.lang.String"value= "C:/SOLR-TOMCAT/SOLR"Override= "true"   />   </Context>

Problem Description:

One problem with personal discovery is that if you configure Jndi, and then start Tomcat under Tomcat's Bin folder, the Solr folder is established under Tomcat's Bin, which is the main index file in this folder. Originally these things should be put into C:/SOLR-TOMCAT/SOLR. If you don't want this to happen, use a method based on the current path.

6 . Open the browser and see if you can access the service. If you can access, congratulations on your running.

Using SOLR to build an enterprise search platform--run SOLR

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.