1. Version Selection
Solr-5.3.1.tgzapache-tomcat-8.0.29.tar.gz
2. Unzip Tomcat and SOLR
tar -zxvf apache-tomcat-8.0. . Tar tar -zxvf solr-5.3. 1
3. Copy SOLR project to Tomcat
1) Copy the WebApp from the/solr-5.3.1/server/solr-webapp directory into the Tomcat WebApps directory
pwd/luxh/solr/solr-5.3. 1/server/solr-webapp[[email protected] solrlswebapp[[email protected] SOLR CP -R webapp//luxh/solr/apache-tomcat-8.0. /webapps/
2) Rename the webapp copied to Tomcat to SOLR
[Email protected] solr-webapp]# cd/luxh/solr/apache-tomcat-8.0. /lsdocs Examples host-manager manager ROOT mv webapp/lsdocs Examples host-manager Manager ROOT
4. Building the SOLR root directory
mkdir Solr_home[[email protected] solr]# CD solr_home/pwd/luxh/solr/solr_home
Copy all files under the SOLR-5.3.1/SERVER/SOLR directory to the SOLR root directory
pwd/luxh/solr/solr-5.3. 1/server/lsconfigsets README.txt solr.xml CP -r/luxh/ solr/solr-5.3. 1/SERVER/SOLR/*
5. Configure the SOLR project in Tomcat
1) Modify the Web. xml file for the SOLR project
pwd/luxh/solr/apache-tomcat-8.0. /webapps/solr/web-inf[[email protected] WEBVI
Remove the <env-entry> comment and set the <env-entry-value> value to the root of the SOLR before setting up
<env-entry> <env-entry-name>solr/home</env-entry-name> <env-entry-value>/luxh/solr/solr_home</env-entry-value> <env -entry-type>java.lang.string</env-entry-type> </env-entry>
2) in the SOLR project that copies all the jar packages in the Solr-5.3.1/server/lib/ext directory
CP -r/luxh/solr/solr-5.3. 1/server/lib/ext/*
3) The log4j.properties copy of the Solr-5.3.1/server/resources directory in the SOLR project
Create the Classes folder first
pwd/luxh/solr/apache-tomcat-8.0. /webapps/solr/web-inf[[email protected] WEBlslib weblogic.xml web.xml[[ Email protected] Webmkdir classes[[email protected] weblsclasses Lib weblogic.xml web.xml[[email protected] Web
Copy log4j.properties
pwd/luxh/solr/solr-5.3. 1/server/lsjetty-logging.properties CP log4j.properties/luxh/solr/apache-tomcat-8.0. /webapps/solr/web-inf/
6. Start Tomcat
[Email protected] apache-tomcat-8.0. in pwd/luxh/solr/apache-tomcat-8.0. in [email protected] Apache-tomcat-8.0. ] # Bin/startup. SH
7, visit http://Your ip:8080/solr/admin.html, the following interface appears, indicating the successful deployment.
SOLR deployment to Tomcat