Installing Apache Solr on ubuntu requires several dependancies. The easiest and quickest way to install Solr on ubuntu currently is done with the package manager: apt
Invoke the following command and you should be able to get apache solr installed on Ubuntu:
sudo apt-get install solr-tomcat
Make sure the java 6 is installed on your machine:
sudo apt-get install sun-java6-jre sun-java6-plugin
Optional Setup: Drupal Search api integration
Optionally you can get drupal setup with drupal search api integration.
Using the search api solr module copy those files and place them in your solr conf folder:
sudo cp -v *.xml /etc/solr/conf
Restart the tomcat service
service tomcat restart
Visit in your browser this url: http://localhost:8080/solr/admin/file/?file=schema.xml
To verify the schema files we've copied over have been loaded look for the following schema to be loaded near the top of the file:
This is the Solr schema file. This file should be named "schema.xml" and should be in the conf directory under the solr home (i.e. ./solr/conf/schema.xml by default) or located where the classloader for the Solr webapp can find it. For more information, on how to customize this file, please see http://wiki.apache.org/solr/SchemaXml
<schema name="search-api-1.0" version="1.2">
After that you're done!