I'm in the happy position of running the most current releases of Solr and Tomcat on my Linode Virtual Ubuntu Server. Not only that, but my public server is now identical to my development environment configuration for Solr and Tomcat making upcoming application updates a snap.
I thought it would be helpful to create a checklist of the issues I need to address when upgrading Solr and Tomcat to eliminate problems in the future. Here's my new Solr Dashboard displaying 4.10.4 and at the bottom its 8.0.30 Tomcat configuration.
First thing to do is update any Solr Indexes locally that are running on the VPS. If you go to NixMashup Links and do a search, you'll be hitting one of those Solr Indexes. I like duplicating my production environment as much as possible, so I first made sure all indexes were running locally in Solr 4.10.4.
Solr Index Upgrade approach tip #1: take an example Collection conf/schema.xml and replace the fields and copyField elements using Meld or some other Linux Comparison app with those from the VPS Index. This results in a flawless Collection upgrade 99% of the time unless you've got other customizations in your schema.xml. This is definitely recommended when upgrading to Solr 5.x. (I successfully upgraded to v5.3.1–my primary intention, but had too many Spring-related problems so stayed with v4.x. Specifically, Solr Url access was fine, Embedded Solr, not so much.)
Solr Index Upgrade approach tip #2: Let Solr Core Admin load the Collection being upgraded. First remove the Collection's core.properties file. Then Optimize the Index in Solr Core Admin and you're good to go.
You don't want anyone to be able to access your Solr Server, so add a Tomcat Manager role in your Solr Administration Webapp's WEB-INF/web.xml file. I blogged about that in Securing Your Public Solr Server.
Easy to forget, you'll want to change the Administration's Context Path to avoid a common issue (common for me, anyway) of the Solr Administration Dashboard not displaying. I blogged about that in When Your Solr Admin Dashboard Won't Load.
For Solr to run with Tomcat we need a few JARs in the class path. We could put them in the Tomcat /lib folder (which I used to do) or we could put them in the Solr Administration Webapp's WEB-INF/lib folder. Adding them to the Solr Webapp avoids the Java runtime errors of multiple Logging libraries in path. Below are the four files you want in Solr.
Apache2, Tomcat and Solr have a different configuration than most Java Website configurations. For one thing, Tomcat wants a conf/Catalina/localhost/solr.xml file. Since this post is primarily a checklist, you can read about the details in my post Solr and Tomcat.
This is important! You want to make sure you modify the Tomcat logging file so you don't have to double your VPS disk size (and monthly bill) like I did. Update the Tomcat conf/logging.properties file to prevent output to Console, or logs/catalina.out. Read more in Keeping Your Tomcat Catalina.out Logging File Small.
Secure Tomcat by adding your Tomcat conf/tomcat-users.xml. You should probably do this earlier than step 7, but make sure it's on the checklist.
When updating Tomcat we can't forget adding soft links in the Tomcat /webapps folder to the Java Sites on the Server. Here's an old photo displaying a Java app link.
With the location of Tomcat changed, need to update any .CONF files in Apache2.
Hopefully I didn't miss anything in the Solr and Tomcat Upgrade Checklist. If I did I'll let you know after the next upgrade!