TOMCAT7 JDK 1.7 configured in SOLR starter Linux

Source: Internet
Author: User
Tags solr log4j

First, the Environment preparation:

System Environment: CentOS 6.5
Tomcat 7.0.26

jdk-7u17-linux-x64.rpm

Solr-4.10.1.tgz

Upload the package to the/tmp directory first
1. JDK Installation

]# RPM-IVH jdk-7u17-linux-x64.rpm
Preparing ... ########################################### [100%]
1:JDK ########################################### [100%]
Unpacking JAR files ...
Rt.jar ...
Error:could not open input file:/usr/java/jdk1.7.0_17/jre/lib/rt.pack
Jsse.jar ...
Error:could not open input file:/usr/java/jdk1.7.0_17/jre/lib/jsse.pack
Charsets.jar ...
Error:could not open input file:/usr/java/jdk1.7.0_17/jre/lib/charsets.pack
Tools.jar ...
Error:could not open input file:/usr/java/jdk1.7.0_17/lib/tools.pack
Localedata.jar ...
Error:could not open input File:/usr/java/jdk1.7.0_17/jre/lib/ext/localedata.pack
Plugin.jar ...
Error:could not open input file:/usr/java/jdk1.7.0_17/jre/lib/plugin.pack
Javaws.jar ...
Error:could not open input file:/usr/java/jdk1.7.0_17/jre/lib/javaws.pack
Deploy.jar ...
Error:could not open input file:/usr/java/jdk1.7.0_17/jre/lib/deploy.pack
Configure $path:vi/etc/profile
# at the end of the/etc/profile add this section
Set Java_home=/usr/java/jdk1.7.0_17
Export Java_home
Set path= $PATH: $JAVA _home
Export PATH
Set Classpath=.:java_home/lib/dt.jar: $JAVA _home/lib/tools.jar

Export CLASSPATH


# java-version
Java Version "1.7.0_17"
Java (TM) SE Runtime Environment (build 1.7.0_17-b03)

# javac-version
Javac 1.7.0_17


2. Tomcat Installation
To decompress the Tomcat package into the TMP directory:
#tar ZXVF apache-tomcat-7.0.26.tar.gz
Move the Tomcat package under/usr/local/tomcat:
#mv Apache-tomcat-7.0.26/usr/local/tomcat


Ii. installation of SOLR
1. Unzip SOLR
#tar-ZXVF solr-4.10.1.tgz
2. Move the SOLR package to the OPT directory:
#mv/TMP/SOLR-4.10.1/OPT/SOLR
3. Copy the Solr.war from Exmaple/webapps to Tomcat
#makdir-P/opt/tomcat/webapps
#]cp/opt/solr/example/webapps/solr.war/opt/tomcat/webapps/
#vim/usr/local/tomcat/conf/server.xml


/opt/tomcat/webapps"
Unpackwars= "true" autodeploy= "true" >


If the Admiral WebApps change to/opt/tomcat/webapps can;


4. Start Tomcat,solr.war Automatic decompression, modify the Web. XML under SOLR Project
cd/usr/local/tomcat/bin/
#./startup.sh
#vi/opt/tomcat/webapps/solr/web-inf/web.xml


5, modify the SOLR home configuration (note: ):
            <env-entry> 
             <env-entry-name>solr/home< /env-entry-name> 
              <env-entry-value>/OPT/SOLR/EXAMPLE/SOLR </env-entry-value> 
             <env-entry-type>java.lang.String</env-entry-type> 
            </ENV-ENTRY>&NBSP;


6. Copy the jar package under Solr/example/lib/ext to/tomcat/. /solr/web-inf/lib/under:
#cp/opt/solr/example/lib/ext/*.jar/opt/tomcat/webapps/solr/web-inf/lib/
7. Create the Classpath under Tomcat SOLR and copy the example/resources/log4j.properties into the classpath:
#mkdir-P/opt/tomcat/webapps/solr/classpath
#cp/opt/solr/example/resources/log4j.properties/opt/tomcat/webapps/solr/classpath/
8. Reboot Tomcat after configuration

#sh/usr/local/tomcat/bin/shutdown.sh
#sh/usr/local/tomcat/bin/startup.sh
9, browser input http://192.168.1.119:8080/solr/into SOLR admin screen

If you can't access it, pay attention to firewall settings

(1) Permanent effect after reboot:
Open: Chkconfig iptables on off: chkconfig iptables off

(2) Immediate effect, failure after restart:

Open: Service iptables start off: Service iptables stop


Reference:

http://blog.csdn.net/idesvo/article/details/8609512

Http://www.linuxidc.com/Linux/2014-03/98024.htm

TOMCAT7 JDK 1.7 configured in SOLR starter 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.