1、下载并安装jdk
2、下载tomcat,安装tomcat,e:\tomcat
3、下载solr4.4 ,解压至E:\solr-4.4.0
4、将e:\solr-4.4.0\examples下的slor文件夹复制到e:\tomcat下面,作为solr的home目录
5、将E:\solr-4.4.0\example\webapps\solr.war复制到E:\tomcat\webapps目录下
6、启动tomcat,会自动解压solr.war
7、修改E:\tomcat\solr\collection1\conf\solrconfig.xml文件,修改datadir
<!-- Data Directory
Used to specify an alternate directory to hold all index data
other than the default ./data under the Solr home. If
replication is in use, this should match the replication
configuration.
-->
<dataDir>${solr.data.dir:F:\tomcat\solr\collection1\data}</dataDir>
8、将solr.war注册给tomcat,在e:/tomcat/conf/Catalina/localhost/下创建solr.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="e:/tomcat/webapps/solr" debug="0" crossContext="true" >
<Environment name="solr/home" type="java.lang.String" value="e:/tomcat/solr" override="true" />
</Context>
9、将e:\solr\examples\lib\ext下的jar包和e\solr\example\resources下的log4包放到tomcat的lib目录下
10、重启tomcat,浏览器输入:http://localhost:8080/solr