This deploy tutorial is for solr-4.8.0 on tomcat. If you want use embeded jetty, please reffer the solr official tutorial.
(1) Install jdk7 or higher
(2) unpackage tomcat7 or higher
2. Deploy solr.war
(1) # cp ..../solr-4.8.0/solr-4.8.0/example/webapps/solr.war ..../apache-tomcat-7.0.53/webapps/
(2) start tomcat to unpackage the solr.war. Because solr.war lack some resources, we need to copy these resources into this web project.
# cp ..../solr-4.8.0/example/lib/ext/* ..../apache-tomcat-7.0.53/webapps/solr/WEB-INF/lib/
# CP ..../solr-4.8.0/example/resources/log4j.properties ..../apache-tomcat-7.0.53/webapps/solr/WEB-INF/classes/
(3) Tell solr project where is its solr home
# vim ..../apache-tomcat-7.0.53/webapps/solr/WEB-INF/web.xml
Add Entity
//
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>/home/jonathan/solr/solr-4.8.0/example/solr</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
//
3. Add Chinese Analyzer -- PaoDing
(1) Download the paoding for lucene4.x
http://git.oschina.net/zhzhenqin/paoding-analysis
(2) Change the "paoding.dic.home" in paoding-dic-home.properties
(3) cp the dic fold from the paoding maven project to the "paoding.dic.home" path
note: The dic folder is under the paoding project
(4) build paoding project to a jar, and copy this jar to ..../apache-tomcat-7.0.53/webapps/solr/WEB-INF/lib/
(5) Add a text FieldType base on paoding in schema.xml
# vim ${SOLR-HOME}/${CORE-NMAE}/conf/schema.xml
Add a FieldType
//
<fieldType name="text_paoding" class="solr.TextField">
<analyzer class="net.paoding.analysis.analyzer.PaodingAnalyzer" />
</fieldType>
//
(6) restart tomcat