SOLR series: deploy SOLR in Linux

Source: Internet
Author: User
Software environment:
Operating System: rehl 5
JDK: JDK 1.6.0 _ 16
Tomcat: 6.0.20
I. Install JDK
Run:
# Sh/home/apps/jdk-6u16-linux-i586-rpm.bin
Install the SDK in the/usr/Java directory by default.
After the installation is complete, run:
# Java-version
The current JRE version is displayed. If it is not 1.6.0 _ 16 (earlier version 1.4 is installed by default), you need to modify the configuration. Run:
# Vi/etc/profile
Add the following content:
Java_home =/usr/Java/jdk1.6.0 _ 16
Classpath =.: $ java_home/lib/tools. Jar
Path = $ java_home/bin: $ path
Export java_home classpath path
Restart the system.
Ii. install Tomcat
Download the Tomcat 6 installation package: apache-tomcat-6.0.20.tar.gz under/home/apps from http://tomcat.apache.org/download-60.cgiand execute:
# Tar zxvf apache-tomcat-6.0.20.tar.gz
# Cp-A apache-tomcat-6.0.20.tar.gz/usr/local/Apache-Tomcat-6.0.20
# Cd, USR, local, Apache, tomcat, 6.0.20, and bin
#./Startup. Sh
Start Tomcat
Iii. Install SOLR
Slave.
Create the SOLR. xml file and add the following content:
<? XML version = "1.0" encoding = "UTF-8"?>
<Context docbase = "/usr/local/Apache-Tomcat-6.0.20/webapps/SOLR. War" DEBUG = "0" crosscontext = "true">
<Environment name = "SOLR/home" type = "Java. lang. string "value ="/usr/local/Apache-Tomcat-6.0.20/webapps/SOLR "override =" true "/>
</Context>
Copy the SOLR. xml file to the/usr/local/Apache-Tomcat-6.0.20/CONF/Catalina/localhost directory.
Create the SOLR. xml file and add the following content:
<? XML version = "1.0" encoding = "UTF-8" standalone = "yes"?>
<SOLR sharedlib = "lib" persistent = "true">
<Cores adminpath = "/admin/cores">
<Core default = "true" instancedir = "Forum" name = "Forum"> </Core>
<Core default = "false" instancedir = "space" name = "space"> </Core>
<Core default = "false" instancedir = "group" name = "group"> </Core>
</Cores>
</SOLR>
Here we have created three solrcore instances: Forum, space, and group. Copy the SOLR. xml file to/usr/local/Apache-Tomcat-6.0.20/webapps/solrusr/local/Apache-Tomcat-6.0.20/webapps/SOLR.
Create folders Forum, space, and group in the usr/local/Apache-Tomcat-6.0.20/webapps/SOLR directory and configure them in the corresponding directories. Here we use Forum as an example, describes how to configure Forum search for SOLR.
Create the directory conf under the Forum Directory, which creates files: solrconfig. XML, schema. XML (both files are required), forum-data-config.xml files. Edit the three files by referring to the attachment.
Restart Tomcat and open the link http: // 192.168.56.102: 8080/SOLR/in the browser. If the correct management interface is displayed, congratulations, the deployment is successful!

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.