Linux CENTOS7 Tomcat Install deployment Solr-5.4.0__linux

Source: Internet
Author: User
Tags mkdir solr log4j
Want to install a SOLR to see what effect, online search for half a day did not get out, assorted, now finally out, sorted out, only for reference, there is nothing wrong welcome pointed out, common progress.

The JDK corresponds to a different version of SOLR, and here is the reference link. The version is wrong.
http://blog.csdn.net/jiangchao858/article/details/52443745

1. Upload the solr-5.4.0.tgz to the Linux server, my upload location for/home/gaolei. Unzip the solr-5.4.0.tgz under the current folder. The solr-5.4.0 folder appears when the decompression is complete. Official website historical version address http://archive.apache.org/dist/lucene/solr/

TAR-ZXVF solr-5.4.0.tgz

2. In order for you to see the path, I will always operate under the Tomcat7 folder. There's a toggle path underneath.

cd/usr/local/tomcat7/

3. Copy Solr-5.4.0/server/solr-webapp/webapp to the WebApps directory under Tomcat and rename it to SOLR.

Cp-r/home/gaolei/solr-5.4.0/server/solr-webapp/webapp WEBAPPS/SOLR

4. Copy all jar packages under the solr-5.4.0/server/lib/ext/directory to tomcat/webapps/solr/web-inf/lib/

Cp-r/home/gaolei/solr-5.4.0/server/lib/ext/* webapps/solr/web-inf/lib/

5. Switch the current position ...
CD to webapps/solr/web-inf/, create the Classes folder. and copy the Log4j.properties file under Solr-5.4.0/server/resources to the Tomcat7/weapps/solr/web-inf/classes directory

mkdir classes
Cp/home/gaolei/solr-5.4.0/server/resources/log4j.properties  classes/

Now the position is under the webapps/solr/web-inf/

6. Copy the SOLR-5.4.0/SERVER/SOLR directory to the TOMCAT7 directory and rename it to Solr_home

Cp-r/home/gaolei/solr-5.4.0/server/solr/usr/local/tomcat7/solr_home

7. Modify the Web.xml of the tomcat7/weapps/solr/web-inf/to remove the annotation (this is commented out by default)

VI Web.xml

Before modification
<!--
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>/put/your/solr/home/here</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
-->

<env-entry> after modification
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>/usr/local/tomcat7/solr_home</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>

8. Restart Tomcat. Browser input ip:8080/solr/index.html You can see the SOLR console.

9. This configuration is core.
Create a My_core in the tomcat7/solr_home/directory (customizable), create a data folder under its directory, and tomcat7/solr_home/configsets/basic_configs/ The Conf folder under the directory is copied to My_core, the core is created, and then the My_core is added to the SOLR console

Cd/usr/local/tomcat7/solr_home
Mkdir-p My_core/data
Cp-r configsets/basic_configs/conf/  my_core/

This is the first, another day update, the most basic probably so.

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.