Friday, March 28, 2014

Solr4.7 Tomcat7 & JDK1.7 Setup

JDK Installation :- 

 yum install java-1.7.0-openjdk.x86_64

 JRE Path :- /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64/jre/bin/java
/usr/lib/java
/usr/share/java
/usr/bin/java

Tomcat7 Installation :- 

Tomcat Path :- /data/container/tomcat7
Command to Start & stop the Tomcat :-
Start :- /data/container/tomcat7/bin/startup.sh
Stop:- /data/container/tomcat7/bin/shutdown.sh

Solr(4.7) Installation(Solr running on Tomcat) :- 
1>Download Solr4.7
2>Copy the all folder from example directory to Tomcat7/lib/Solr Directory
3>Created the mdrcore1
4>Setup the Data path in solrconfig.xml
5>Added Schema in schema.xml as per our requirement
6> There is solr.xml file in /data/container/tomcat7/lib/solr/solr/solr.xml which we need to kept as it is 7>Created new solr.xml file in /data/container/tomcat7/conf/Catalina/localhost/solr.xml , so that Tomcat7 should from where Solr be loaded .
8>Need to Copy solr.war file from dist directory to /data/container/tomcat7/webapps/solr.war
Start the Tomcat server so that solr will also be started .
 To add & Index docs in solr ,
use the following command 
cd /data/container/tomcat7/lib/solr/exampledocs
java -Dauto -Durl="http://rsmdrdevwb8001:8080/solr/mdrcore1/update" -jar post.jar data.xml

data.xml is data file


during the integration of Solr & Tomcat , if there is Error while starting up the Tomcat , Please copy all jar files from dist/ext/ to tomcat7/lib/  directory also copy log4j to tomcat7/logs

No comments:

Post a Comment