Deploy Solr4.8.1 under CentOS6.4

Source: Internet
Author: User

Deploy Solr4.8.1 under CentOS6.4
1. Environment preparation: CentOS6.4, Tomcat6.0, Jdk1.7, Solr4.8.1
2. Installation (1) install jdk1.7 (I encountered a version exception when using jdk1.6, so we recommend that you use jdk1.7 because solr4.8 is used) configure the environment variable. The default jdk installation directory is usr/java/jdk1.7 (because the rpm installation package is used) export JAVA_HOME =/usr/java/jdk1.7exprot PATH =.: $ PATH: $ JAVA_HOME/bin save the file and exit. Execute the command: source/etc/profile to make it take effect immediately. Finally, run the command java-version to view the version information. (2) install tomcat6 and decompress tomcat6 directly. For the convenience of renaming, unzip the directory to/usr/local/tomcat6 (3) install solr and decompress solr4.8.1 directly to the directory/usr/local/and rename it solr; then copy solr/dist/solr-4.8.1.war to tomcat6/webapps; then modify tomcat6/conf/server. xml <Host name = "localhost" appBase = "/usr/local/tomcat/webapps"
UnpackWARs = "true" autoDeploy = "true"> change webapps to/usr/local/tomcat/webapps. (4) start tomcat and solr. war is automatically decompressed, and then the web under solr project is modified. xml to enter the bin directory :. /startup. sh start tomcat to modify the solr home configuration (Note: remove the comments of this Section, otherwise it will not take effect ):
<Env-entry>
<Env-entry-name> solr/home </env-entry-name>
<Env-entry-value>/usr/local/tomcat/webapps </env-entry-value>
<Env-entry-type> java. lang. String </env-entry-type>
</Env-entry> (5) copy the jar package under solr/example/lib/ext to tomcat/webapps/solr/WEB-INF/libcp/usr/local/solr/example/lib/ext /*. jar/usr/local/tomcat6/webapps/solr/WEB-INF/lib/(6) Create classpath under tomcat solr and put example/resources/log4j. copy properties to the classpath cp/usr/local/solr/example/resources/log4j. properties/usr/local/tomcat/webapps/solr/classpath/(7) Restart tomcat. /shutdown. sh. /startup. sh (8) test open the browser and enter: http: // 192.168.0.9: 8080/solr to enter the sor admin screen.

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.