- Tomcat 8.0.9 (http://apache.mirror.vu.lt/apache/tomcat/tomcat-8/v8.0.9/bin/apache-tomcat-8.0.9.zip)
- Solr 4.9.0 (http://apache.mirror.serveriai.lt/lucene/solr/4.9.0/solr-4.9.0.zip)
- Windows 7
The steps to do this are as follows:
- Edit Tomcat's conf/server.xml file and put URIEncoding="UTF-8" this attribute to the main Connector element.
- Create directory where you will keep your Solr cores configurations. For e.g. D:\Solr
- Create directories which will be your Solr cores inside the directory you've just created in step nr. 2. For e.g. I'll have two cores: D:\Solr\solr-core-1, D:\Solr\solr-core-2
- Copy the file solr.xml from the directory example\multicore of downloaed and unzipped Solr archive and paste it to your Solr root directory. For e.g. : D:\Solr
- Edit solr.xml file depending on your core names. For e.g. in my case: <core name="solr-core-1" instanceDir="solr-core-1" />, <core name="solr-core-2" instanceDir="solr-core-2" />.
- Copy solr.x.x.x.war from the dist directory of the unzipped Solr archive to the Tomcat's webapps folder and rename it to solr.war.
- Create file called: setenv.bat in the Tomcat's bin folder. Open that file and paste this line into it: set JAVA_OPTS="-Dsolr.solr.home=D:\Solr"
- Open conf\solrconfig.xml files in each of the cores you have created and change the dataDir element to point to your cores' data directories. For e.g.: data directory for solr-core-1: <dataDir>D:\\Solr\\solr-core-1\\data</dataDir>
- Copy all the jar files from the unzipped Solr archive's directory example\lib\ext to the Tomcat's lib directory.
- Copy the file: example\resources\log4j.properties from Solr unzipped archive into the same Tomcat's lib directory. Just make sure you change these properties according to your needs.
- Start the Tomcat and your Solr cores will be listed if you access this URL: http://localhost:8080/solr/#/~cores