sudo apt-get update
sudo apt-get upgrade
sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples
2.下载apache-solr-1.4.1.zip并解压
cd ~/
wget -c http://ftp.riken.jp/net/apache//lucene/solr/1.4.1/apache-solr-1.4.1.zip
unzip apache-solr-1.4.1.zip
sudo cp ./apache-solr-1.4.1/dist/apache-solr-1.4.1.war /var/lib/tomcat6/webapps/solr.war
sudo cp -R ./apache-solr-1.4.1/example/solr/ /var/lib/tomcat6/solr/
3. 在tomcat6里面设置solr环境
sudo vim /etc/tomcat6/Catalina/localhost/solr.xml
修改原有的文件中部分信息如下:
<Context docBase=”/var/lib/tomcat6/webapps/solr.war” debug=”0″ privileged=”true” allowLinking=”true” crossContext=”true”> <Environment name=”solr/home” type=”java.lang.String” value=”/var/lib/tomcat6/solr” override=”true” /> </Context>
设置tomcat6访问data的权限
chown -R tomcat6:tomcat6 /var/lib/tomcat6/solr/data/
6. 重启tomcat后进入solr
sudo service tomcat6 restart
http://localhost:8983/solr/admin