Centos5.8 install Tomcat 7 and solr4.9

Source: Internet
Author: User
Tags solr
Download the corresponding software first
Tomcat7.0 click to download
Solr4.9 click to download

Solr4.9 requires jdk1.7, so you must upgrade Java first:
View the current version:
yum search java | grep -i --color JDK
Upgrade:
yum install java-1.7.0-openjdk java-1.7.0-openjdk-devel
Install Tomcat 7:
unzip apache-tomcat-7.0.54.zipmv apache-tomcat-7.0.54 /data/tomcat7
Modify the port:/data/tomcat7/CONF/server. xml
The 8080 is:
<Connector port="8080" protocol="HTTP/1.1"               connectionTimeout="20000"               redirectPort="8443" />
Start Tomcat 7:
cd /data/tomcat7/binchmod +x ./shutdown.sh ./startup.sh ./catalina.sh./startup.sh
The prompt is as follows:
Using CATALINA_BASE:   /data/tomcat7Using CATALINA_HOME:   /data/tomcat7Using CATALINA_TMPDIR: /data/tomcat7/tempUsing JRE_HOME:        /usrUsing CLASSPATH:       /data/tomcat7/bin/bootstrap.jar:/data/tomcat7/bin/tomcat-juli.jarTomcat started.
Access: http: // localhost: 8080
Set Tomcat GUI permissions:
vi /data/tomcat7/conf/tomcat-users.xml
Set:
<!--  <role rolename="tomcat"/>  <role rolename="role1"/>  <user username="tomcat" password="tomcat" roles="tomcat"/>  <user username="both" password="tomcat" roles="tomcat,role1"/>  <user username="role1" password="tomcat" roles="role1"/>-->
Changed:
<Role rolename = "Manager-Gui"/> <User Username = "your account" Password = "password" roles = "Manager-Gui"/>

Install solr4.9
unzip solr-4.9.0.zipcd solr-4.9.0cp solr-4.9.0/dist/solr-4.9.0.war /data/tomcat7/webapps/solr.war
Modify SOLR index file home directory:/data/tomcat7/webapps/SOLR/WEB-INF/Web. xml
<!--    <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>   -->
Changed:
<env-entry-name>solr/home</env-entry-name>       <env-entry-value>/data/solr</env-entry-value>       <env-entry-type>java.lang.String</env-entry-type>    </env-entry>
Create solr index directory:
mkdir -p /data/solrcp -rf solr-4.9.0/example/solr/* /data/solr/
Modify/data/SOLR/collection1/CONF/solrconfig. xml:
${solr.data.dir:}
Changed:
${solr.data.dir:/data/solr/collection1/data}
Finally, copy the corresponding JAR file (important ):
cp -rf solr-4.9.0/example/lib/ext/* /data/tomcat7/lib/cp -rf solr-4.9.0/example/resources/log4j.properties /data/tomcat7/lib
Restart Tomcat 7:
/data/tomcat7/bin/shutdown.sh/data/tomcat7/bin/startup.sh

Centos5.8 install Tomcat 7 and solr4.9

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.