Download
Tomcat7: http://tomcat.apache.org/download-70.cgi
solr4.0: http://mirror.bit.edu.cn/apache/lucene/solr/4.0.0/
install tomcat
1. unzip apache-tomcat-7.0.33-windows-x64.zip to D:\apache-tomcat
2. configuration environment variable:
CATALINA_HOME D:\apache-tomcat
classpath add D:\apache-tomcat\bin
D:\apache-tomcat\conf\tomcat-users.xml
<tomcat-users> <role rolename="tomcat"/> <role rolename="role1"/> <user username="tomcat" password="tomcat" roles="tomcat, manager-gui"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> </tomcat-users>
3. run tomcat
1) cmd -> D:\apache-tomcat\bin>startup.bat
2) Into directory D:\apache-tomcat\bin, then double click startup.bat
then , open http://localhost:8080 to check sucessful.
install solr
1. unzip apache-solr-4.0.0.zip
2. create home directory D:\solr_home
copy D:\Downloads\apache-solr-4.0.0\example to D:\solr_home
or only copy D:\Downloads\apache-solr-4.0.0\example\solr to D:\solr_home\solr
3. copy D:\Downloads\apache-solr-4.0.0\dist\apache-solr-4.0.0.war
or D:\Downloads\apache-solr-4.0.0\example\webapps\solr.war
to D:\solr_home\solr\war\solr.war
4. configuration solr.home
1) based on current path
This way needs to start tomcat in the directory D:\solr_home, Solr will find ./solr,
so when start, we need to change to D:\solr_home.
2) based on environment variable
create new variable solr.home = D:\solr_home
3) based on JNDI
create solr.xml file, in D:\apache-tomcat\conf\Catalina\localhost\solr.xml
content:
<Context docBase="D:/solr_home/solr/solr.war" debug="0" crossContext="true" > <Environment name="solr/home" type="java.lang.String" value="D:/solr_home/solr" override="true" /> </Context>
5. start tomcat server
http://localhost:8080/solr/admin solr management interface
http://localhost:8080/solr/browse blog example interface
PS: You should use Google browser or firefox . Others cant display property.
use IE brower, failure interface like this: