Installation and configuration of SOLR under Linux

Source: Internet
Author: User
Tags solr

First, installation

1. Required installation package: apache-tomcat-7.0.47.tar.gz, solr-4.10.3.tgz.tgz (JDK self-installing)

2. Unzip Tomcat and create the SOLR folder

tar -zxf apache-tomcat-7.0. . tar. gz
[Email protected] ~]# MKDIR/USR/LOCAL/SOLR

3. Copy the Tomcat-extracted folder into the SOLR Tomcat folder

CP apache-tomcat-7.0.  /usr/local/solr/tomcat-r

4. Upload the SOLR tarball to the server and unzip it, then deploy the/root/solr-4.10.3/dist/solr-4.10.3.war package to Tomcat. and changed its name to Solr.war.

tar -zxf solr-4.10.3.tgz.tgz
[email protected] ~]# CP Solr-4.10.3.war/usr/local/solr/tomcat/webapps/solr.war

5. Unzip the war package. Start Tomcat automatic decompression. Then close Tomcat and delete the war package

6. Copy all jar packages from the/root/solr-4.10.3/example/lib/ext directory to the SOLR project

CP */usr/local/solr/tomcat/webapps/solr/web-inf/lib/

7. Create the Solrhome folder, which is used to hold all the SOLR server configuration files. Copy the Solr folder in/root/solr-4.10.3/example to Solrhome

CP -R solr/usr/local/solr/solrhome

8. Specify the location of the solrhome in the Web. xml file in the SOLR project

9. Start Tomcat

Second, the configuration

-----Chinese Parser configuration

1. Upload the Ik-analyzer Analyzer's folder to the server

2. Add the parser jar package to the SOLR project

CP ikanalyzer2012ff_u1.jar/usr/local/solr/tomcat/webapps/solr/web-inf/lib/

3. Copy the extended dictionary and Ikanalyzer dictionary and configuration files needed by the web-inf/classes to the SOLR Project's folder

CP IKAnalyzer.cfg.xml Ext_stopword.dic mydict.dic/usr/local/solr/tomcat/webapps/solr/web-inf/classes

4. Configure the Filedtype in Solrhome/collection1/conf/schema.xml

----- Business Field Configuration
1. Configure in Solrhome/collection1/conf/schema.xml, select the appropriate field corresponding to the SOLR field according to the business need

<field name="User_name"Type="Text_ik"Indexed="true"Stored="true"/><field name="User_Address"Type="Text_ik"Indexed="true"Stored="true"/><field name="Item_keywords"Type="Text_ik"Indexed="true"Stored="false"Multivalued="true"/><copyfield source="User_name"dest="Item_keywords"/><copyfield source="User_Address"dest="Item_keywords"/>

2. Restart Tomcat

Installation and configuration of SOLR under Linux

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.