SOLR and. NET Series course (ix) configuration of solr5.1

Source: Internet
Author: User
Tags solr

SOLR and. NET Series course (ix) configuration of solr5.1

Recently some friends to consult solr5.1 configuration, and then I went to the official website to download the latest version of SOLR, found solr5.0 after the contents of SOLR's download package changes, removed and added some files, which led to the initial configuration of SOLR is not the same, Cause some of the garden friends to learn SOLR had to download the previous version of SOLR to learn, in order to keep up with the times not to be eliminated, so it is here to add an article solr5.1 configuration, I hope we take a few detours.

1. Download Tomcat and SOLR and unzip (install the JDK before installing)

After Tomcat decompression, the disk path is C:/Program Files/apache software foundation/tomcat 7.0 (path arbitrary).

2. Download SOLR package on the official website i downloaded the solr-5.1.0.

Deploy SOLR to Tomcat

A) Copy the SOLR directory under solr-5.1.0/example/example-dih/to the root directory of Tomcat (i.e. C:/Program files/apache software Foundation/tomcat 7.0/ Path below)

Note: This path can be arbitrary, learn the best follow the above path, in order to avoid configuration problems, proficiency can be copied to any path

b) Copy the Solr.war from the Solr5.1.0/server/webapps directory to the Tomcat WebApps directory, start Tomcat, and then automatically generate a SOLR folder under that folder

c) Modify the Tomcat/webapps/solr/web-inf/web.xml, locate the Env-entry node, the node is in the commented state, uncomment it, and change to the following

  <Env-entry>       <Env-entry-name>Solr/home</Env-entry-name>       <Env-entry-value>C:\Program Files\apache Software Foundation\tomcat 7.0\SOLR</Env-entry-value>       <Env-entry-type>Java.lang.String</Env-entry-type>    </Env-entry>

Note: This path corresponds to step a

d) Copy the jar package from Solr-5.1.0/server/lib/ext to the webapps/solr/web-inf/lib of Tomcat. Then the solr-5.1.0/server/resources/under the log4j.properties also put under Webapps/solr/web-inf/classes/, no Classes folder to create a new one.

e) Copy the Solr-dataimporthandler-5.1.0.jar and Solr-dataimporthandler-extras-5.1.0.jar under Solr-5.1.0/dist to webapps/solr/ Web-inf/lib under

And then

Turn the tomcat back on;

Open Browser HTTP://LOCALHOST:8080/SOLR If the following interface shows that the installation was successful

Next, we'll copy the Dist and contrib under solr-5.1.0 to the Tomcat root directory

Then i we open step A to copy over the folder and you will see the following folder

Open these five files you will find that the documents are similar, this is solr5.0 after the multi-core,

Then put the Conf folder under the Five folder under the Solrconfig.xml, file in the

  <Libdir= "${solr.install.dir:". /.. /.. /..} /dist/"Regex= "Solr-dataimporthandler-.*\.jar" />  <Libdir= "${solr.install.dir:". /.. /.. /..} /contrib/extraction/lib "Regex= ". *\.jar" />  <Libdir= "${solr.install.dir:". /.. /.. /..} /dist/"Regex= "Solr-cell-\d.*\.jar" />  <Libdir= "${solr.install.dir:". /.. /.. /..} /contrib/clustering/lib/"Regex= ". *\.jar" />  <Libdir= "${solr.install.dir:". /.. /.. /..} /dist/"Regex= "Solr-clustering-\d.*\.jar" />  <Libdir= "${solr.install.dir:". /.. /.. /..} /contrib/langid/lib/"Regex= ". *\.jar" />  <Libdir= "${solr.install.dir:". /.. /.. /..} /dist/"Regex= "Solr-langid-\d.*\.jar" />  <Libdir= "${solr.install.dir:". /.. /.. /..} /contrib/velocity/lib "Regex= ". *\.jar" />  <Libdir= "${solr.install.dir:". /.. /.. /..} /dist/"Regex= "Solr-velocity-\d.*\.jar" />

Change to the following:

  <Libdir= "C:/Program files/apache software foundation/tomcat 7.0/contrib/extraction/lib"Regex= ". *\.jar" />  <Libdir= "C:/Program files/apache software foundation/tomcat 7.0/dist/"Regex= "Solr-cell-\d.*\.jar" />  <Libdir= "C:/Program files/apache software foundation/tomcat 7.0/contrib/clustering/lib/"Regex= ". *\.jar" />  <Libdir= "C:/Program files/apache software foundation/tomcat 7.0/dist/"Regex= "Solr-clustering-\d.*\.jar" />  <Libdir= "C:/Program files/apache software foundation/tomcat 7.0/contrib/langid/lib/"Regex= ". *\.jar" />  <Libdir= "C:/Program files/apache software foundation/tomcat 7.0/dist/"Regex= "Solr-langid-\d.*\.jar" />  <Libdir= "C:/Program files/apache software foundation/tomcat 7.0/contrib/velocity/lib"Regex= ". *\.jar" />  <Libdir= "C:/Program files/apache software foundation/tomcat 7.0/dist/"Regex= "Solr-velocity-\d.*\.jar" />   <Libdir= "C:/Program files/apache software foundation/tomcat 7.0/dist/"Regex= "Solr-dataimporthandler-\d.*\.jar" />  

Or use a relative path

  <Libdir=".. /.. /dist/"Regex= "Solr-dataimporthandler-.*\.jar" />  <Libdir=".. /.. /contrib/extraction/lib "Regex= ". *\.jar" />  <Libdir=".. /.. /dist/"Regex= "Solr-cell-\d.*\.jar" />  <Libdir=".. /.. /contrib/clustering/lib/"Regex= ". *\.jar" />  <Libdir=".. /.. /dist/"Regex= "Solr-clustering-\d.*\.jar" />  <Libdir=".. /.. /contrib/langid/lib/"Regex= ". *\.jar" />  <Libdir=".. /.. /dist/"Regex= "Solr-langid-\d.*\.jar" />  <Libdir=".. /.. /contrib/velocity/lib "Regex= ". *\.jar" />  <Libdir=".. /.. /dist/"Regex= "Solr-velocity-\d.*\.jar" /><Libdir=".. /.. /dist/"Regex= "Solr-dataimporthandler-\d.*\.jar" />  

Here the DB folder is 4.7.2 Collection1 folder, if you are a solr out of learning, I suggest you start from the first article 4.72 configuration, the previous article is based on 4.7.2 configuration, 5.1 and before the configuration file difference, You can learn 4.7.2 after the configuration of 5.1.0, these two are only in the initial configuration of a great difference, but in the use of the basic is the same

QQ Group: 424259523

SOLR and. NET Series course (ix) configuration of solr5.1

Related Article

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.