The SOLR server is developed using JAVA5 and is based on the Lucene Full-text search.
To build SOLR, first configure the Java environment, install the corresponding JDK, and Tomcat, which is not much to say here.
The following is the latest version of solr4.10.3 in jdk1.7 and tomcat1.7 environments.
The specific steps are as follows: 1. To the official website http://lucene.apache.org/solr/mirrors-solr-latest-redir.html download.
2. Build the catalogue/WEBAPPS/MYSOLR/SOLR
3. Unpack the compressed package solr-4.10.3, find the Solr.war package in the WebApps under example, and unzip it.
4. Copy the extracted War package (Solr folder) to the 2nd step directory:/WEBAPPS/MYSOLR
5. Copy Jar Pack from two places to/webapps/mysolr/solr/web-inf/lib
(1) example all jar packages under Lib package
(2) All jar packages in the EXT package under the example Lib package
6. Copy the Log4j.properties file under Example/resource to/webapps/mysolr/solr/classpath
7.solrhome configuration:
First create a solrhome directory:/webapps/mysolr/solrhome, and then copy all the files under EXAMPLE/SOLR to/webapps/mysolr/solrhome
Then modify the configuration file/webapps/mysolr/solr/web-inf/web.xml to release the Solr/home annotations and configure them as follows:
[HTML] View plain copy <env-entry> <env-entry-name>solr/home</env-entry-name> <env-entry- Value>/webapps/mysolr/solrhome</env-entry-value> <env-entry-type>java.lang.string</ Env-entry-type> </env-entry>
8. Deploy/WEBAPPS/MYSOLR/SOLR to Tomcat and start Tomcat.
The above completed the basic structure of SOLR environment, access to HTTP://LOCLHOST:8080/SOLR can see the following interface: