[size=large][b]Download[/b][/size]
Tomcat7: http://tomcat.apache.org/download-70.cgi
solr4.0: http://mirror.bit.edu.cn/apache/lucene/solr/4.0.0/
[b][size=large]install tomcat[/size][/b]
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
[img]http://dl.iteye.com/upload/attachment/0077/2338/0436932c-160b-3261-a50c-cfdd56c151d7.png[/img]
then , open http://localhost:8080 to check sucessful.
[img]http://dl.iteye.com/upload/attachment/0077/2340/de5d6346-7316-3a25-9d53-90f7e2743088.png[/img]
[size=large][b]install solr[/b][/size]
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
[img]http://dl.iteye.com/upload/attachment/0077/2336/071837c8-6bcd-3fe2-8839-b70b6d18dfb1.png[/img]
PS: You should use Google browser or firefox . Others cant display property.
use IE brower, failure interface like this:
[img]http://dl.iteye.com/upload/attachment/0077/2342/4b123df1-9892-3566-9684-16c02cf77ab7.png[/img]