Deploying SOLR Services separately under Windows and Linux

Source: Internet
Author: User
Tags solr

I. Deploying the SOLR service under Windows

1. Before Windows Deployment SOLR:

jdk1.7+tomcat-7+solr-4.10.4

1.1, install the JDK will not say

1.2. Install Tomcat

Download down directly to the specified directory, I extracted directly to the D disk.

1.3. Install SOLR (emphasis)

1.3.1, first download SOLR

: Http://apache.fayea.com/lucene/solr/4.10.4/solr-4.10.4.zip

1.3.2, unzip to the specified directory, this directory itself is specified.


1.3.3, go to directory, find Solr-4.10.4.war

1.3.4, direct copy to Tomcat7 WebApps

1.3.5, next launch Tomcat, then Tomcat will extract the war package, delete the war package, into the SOLR directory found in the Lib directory

1.3.6, back to SOLR source file, copy all files under the G:\solr\solr-4.10.4\solr-4.10.4\example\lib\ext directory into Tomcat's Solr Lib


1.3.7, in the back to the SOLR source file copy the Solr folder in the g:\solr\solr-4.10.4\solr-4.10.4\example/directory to the specified location, such as I copied to d:\ Solrhome

1.3.8, find the Web. xml file under Taomcat's WebApps, and edit the file

D:\tomcat7\apache-tomcat-7.0.55\webapps\solr\WEB-INF\web.xml

Remove the note below and modify the position path of the value in Env-entry-value to Solrhome

1.3.9. Restart Tomcat


1.43.10, open the browser to access HTTP://LOCALHOST:8080/SOLR

The effect is as follows


The instructions are already configured.


2. Configuring SOLR in Linux

2.1, jdk1.7+tomcat7+solr-4.10.4

Is the same as the configuration environment for Windows.

2.1.1, download the compressed package to Linux, and extract to the specified directory

Unzip the JDK

Tar-zxvf/opt/software/jdk1.7.0_67.tar.gz

Move to the specified directory

mv/opt/sofrware/jdk1.7.0_67/opt/modules/

Unzip Tomcat

Tar zxvf apache-tomcat-7.0.69.tar.gz

Move to the same directory as the JDK

MV Apache-tomcat-7.0.69/opt/modules/

Modify the Server.xml file

Add uriencoding= "UTF-8" to the label above


Unzip SOLR

Tar zxvf solr-4.10.4.tar.gz

Move to Tomcat's consent directory

MV Solr-4.10.4/opt/modules/

Execute ls to view the file just unzipped under/opt/modules/

Cd/opt/modules/ls


And then edit/etc/profile.

Perform

Vi/etc/profile

After editing, then execute source/etc/profile to make the configuration take effect


2.1.2, configuring SOLR

Go to the extracted SOLR directory and find a file

Cd/opt/modules/solr-4.10.4/solr/example



Copied to the specified directory, I copied it to the/opt/data/directory and named Solrhome

Cp-r solr//OPT/DATA/MV Solr/solrhome


Go to the/opt/modules/solr-4.10.4/solr/webapp directory, copy the Web directory to Tomcat WebApps, and rename it to SOLR.

Cd/opt/modules/solr-4.10.4/distcp SOLR-4.10.4.WAR/OPT/MODULES/APACHE-TOMCAT-7.0.69/WEBAPPS/MV solt-4.10.4 SOLR



Starting Tomcat will automatically unzip the war pack


Go to the Web-inf directory in SOLR

Cd/opt/modules/apache-tomcat-7.0.69/webapps/solr/web-inf

Edit Web. xml

VI Web. XML

Uncomment this code and modify the path of the Env-entry-value value to Solrhome


Go to the extracted SOLR path/opt/modules/solr-4.10.4/example/lib/ext

Copy all of the jar packages inside to Solr's Lib under Tomcat.


Go to the extracted SOLR path/opt/modules/solr-4.10.4/example/resources

Copy the following log4j.properties to the classes in Tomcat under SOLR


2.1.3, starting Tomcat

Enter/opt/modules/apache-tomcat-7.0.69/bin

Perform

./startup.sh


Execute command

Service Firewalld Stop

Shutting down the firewall

Access IP:8080/SOLR in the browser of window

Under Windows and Linux are configured, in the middle of a number of problems encountered, especially attention is:

Configure the environment variables and introduce the necessary jar package configurations.

Deploying SOLR Services separately under Windows and 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.