Xap is a new rapid PHP-MySQL development engine that offers shorthand syntax, pagination, ORM, caching and more...

Install Solr on Ubuntu 11.04 Server

By Shay Anderson on July 2011
You may want to first update and upgrade system:>> apt-get update
>> apt-get upgrade
Install Java:>> apt-get install sun-java6-jre sun-java6-pluginIf sun-java6-jde is not found do this:>> apt-get install python-software-properties
>> add-apt-repository ppa:ferramroberto/java
>> apt-get update
>> apt-get install sun-java6-jre sun-java6-plugin
Check Java install version:>> java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
Create directory for Solr:>> mkdir /home/solr
>> cd /home/solr
Download version of Solr from http://www.apache.org/dyn/closer.cgi/lucene/solr/
For example:>> wget http://www.trieuvan.com/apache//lucene/solr/1.4.1/apache-solr-1.4.1.tgzExtract Solr from downloaded file:>> tar -xvf apache-solr-1.4.1.tgzGo to new extracted Solr example directory, for example:
>> cd /home/solr/apache-solr-1.4.1/exampleStart Solr with:>> java –jar start.jarThis should display a bunch of text output, along with this:Started SocketConnector @ browser and attempt to load Solr:http://localhost:8983or IP address example:

If Solr is installed correctly a link should be display, that will redirect you to the Solr page and Solr admin access link

You can stop the Solr service by using Ctrl+c from the command line

You can start Solr server in the background by using:>> java -jar start.jar &
You can check for a listening Solr port with netstat:>> netstat -l
tcp6 0 0 [::]:8983 [::]:* LISTEN

If you want to secure the admin pages look at this article.