1. Preparation phase
Operating system: CentOS 6.8
Installation package:/home/test
Solr-4.10.3.tgz.tar
IK Analyzer 2012ff_hf1.zip
Jdk-8u121-linux-i586.tar.gz
Apache-tomcat-6.0.51.tar.gz
2.JDK and the Tomcat Installation: Slightly
3. Installing SOLR
(1) Unzip SOLR
TAR-ZXVF solr-4.10.3.tgz.tar-c/usr/local
(2) Solr.war copy to Tomcat
cp/usr/local/solr-4.10.3/example/webapps/solr.war/home/tomcat6/webapps/
cd/home/tomcat6/webapps/&& mkdir solr && unzip solr.war-d solr && RM-RF Solr.war
(3) Modify the SOLR home configuration (note: To remove the comments from this section, otherwise it will not take effect):
Vim Solr/web-inf/web.xml
<Env-entry><Env-entry-name>Solr/home</Env-entry-name><Env-entry-value>/home/solrhome</Env-entry-value><Env-entry-type>Java.lang.String</Env-entry-type></Env-entry>
(4) Copy associated jar
cp/usr/local/solr-4.10.3/example/lib/ext/*.jar/home/tomcat6/webapps/solr/web-inf/lib/
cp/usr/local/solr-4.10.3/dist/solrj-lib/*.jar/home/tomcat6/lib/
(5) Create the classes under Tomcat SOLR and copy the Example/resources/log4j.properties into the classes:
Mkdir-p/home/tomcat6/webapps/solr/web-inf/classes
cp/usr/local/solr-4.10.3/example/resources/log4j.properties/home/tomcat6/webapps/solr/web-inf/classes/
/home/tomcat6/conf/server.xml, add the encoding settings.
(6) Create Solrhome
Mkdir/home/solrhome
Cp-r/usr/local/solr-4.10.3/example/solr/*/home/solrhome
(7) Launch Tomcat and access HTTP://IP:8080/SOLR
Configuration Solr4.10.3 in 2.Linux environment