Technology, Social Media, Travel
RSS icon Email icon Home icon
  • Installing Solr on Ubuntu Jaunty 9.04

    Posted on August 20th, 2009 John Berns 13 comments
    Solr install success on Ubuntu Jaunty 9.04

    Solr install success on Ubuntu Jaunty 9.04

    I just installed Apache Solr on Ubuntu Jaunty 9.04. I am not a Java or Tomcat person, so it was all rather new and a confusing, there was no good install guide and I hit a few walls, so here are some pointers that should get you to a working install.

    I am using the command-line install method, so it’s works for desktop and server editions. You can skip the apt-gets and use Synaptics Package Manager to install the packages if you prefer.

    1) Install Java

    sudo apt-get install sun-java6-bin sun-java6-demo sun-java6-jdk sun-java6-jre

    I believe the default install of Jaunty installs openjdk java, so you will want to make sure that Sun Java is chosen:

    sudo update-alternatives --config java

    You will prompted to pick a version as the default:

    Select the Sun Java version

    Select the Sun Java version

    Edit /etc/profile to sent the JAVA_HOME environment variable:

    JAVA_HOME=/usr/lib/jvm/java-6-sun
    export JAVA_HOME

    2) Install Tomcat

    sudo apt-get install tomcat5.5 libtomcat5.5-java tomcat5.5-admin tomcat5.5-webapps

    Check that Tomcat is running:

    sudo service tomcat5.5 status

    Grant yourself Tomcat Manager and Admin permissions; edit /usr/share/tomcat5.5/conf/tomcat-users.xml and include the following:

    <user username="myname" password="mypassword" roles="admin,manager"/>

    3 Install Solr

    sudo apt-get install solr-common solr-tomcat5.5 libxpp3-java

    (I kept getting “java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException at java.lang.Class.forName0(Native Method)” in the Solr admin page; a little searching led me to find that the problems was that libxpp3-java was not installed. Why it’s not a required package, I don’t know!)

    4) Restart Tomcat and Test Solr

    sudo service tomcat5.5 restart

    Now you can go to the Tomcat web admin page at http://localhost:8180/ and login with the credentials you supplied above.

    Go to http://localhost:8180/solr/ and do a test query to confirm it’s working.

    results

    Of course you will get zero results, you have no content indexed yet.

    That should be enough to get started!

     

    12 responses to “Installing Solr on Ubuntu Jaunty 9.04” RSS icon


    1 Trackbacks / Pingbacks

    Leave a reply