<span style="font-size: small;"><span style="font-family: arial,helvetica,sans-serif;"><strong>sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"</strong></span></span>
<span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><strong>sudo apt-get update<br /></strong></span></span><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><strong>sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts</strong></span></span><br />
sudo apt-get install sun-java6-bin sun-java6-demo sun-java6-jdk
sun-java6-jre
sudo update-alternatives --config java
2)install tomcat6
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user
tomcat6-docs tomcat6-examples
重启tomcat
sudo /etc/init.d/tomcat6 restart
chmod -R 777 solr
更改solrconfig.xml中的datadir为如下内容
<dataDir>/var/lib/solr/data</dataDir>