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.