apt-get install solr-tomcat 剪切/etc/solr/conf中的schema.xml和solrconfig.xml,为schema.xml.bak和solrconfig.xml.bak 把drupal solr模块中的schema.xml和solrconfig.xml文件连接到/etc/solr/conf中 cd /etc/solr/confmv schema.xml schema.xml.bakmv solrconfig.xml solrconfig.xml.bakln -s [you site modules]/apachesolr/schema.xml schema.xmlln -s [you site modules]/apachesolr/solrconfig.xml solrconfig.xml编辑solrconfig.xml文件,找到类似于 <!-- Used to specify an alternate directory to hold all index data+ ~7 ?# @3 G3 D
other than the default ./data under the Solr home.) y+ t/ ^! j& z2 x2 l* X
If replication is in use, this should match the replication configura tion. -->
3 B7 G6 L) }2 ~( Z; C( w$ k <!--
5 y0 x+ h8 \- _& ~" W" K) I <dataDir>${solr.data.dir:./solr/data}</dataDir>" j5 x3 Y4 o% g
--> 下增加 <dataDir>/var/lib/solr/data</dataDir>重启 /etc/init.d/tomcat6 restart 访问地址为 localhost:8080/solr 还需要改 搜索模块为 Apache Solr search 就可以用了 W) I- N G8 C% v5 H$ W' h
1 G: S$ p) g f+ P# u+ b* Y' r' T
^2 ^4 c: Q$ |0 L, w; z9 z* l. i6 l; N+ \+ z' p. E0 V6 V, f# K1 O( G" p6 `
|