Since burning my ship and switching between Mac and Linux (for work… At home, it’s straight-up Linux), I have found a much easier way of making software manageable for me. This means its manageable BY me but that’s ok because with some apps, I need to control versioning. This works with apps that are downloadable, don’t have a million and one dependencies and meant to run independently.
Previously, as most Linux users should, I used the package management system. This is still a good practice, making installation and removal easy, not to mention patching/updates/upgrades/etc. However, my local Ubuntu as a deathgrip on Java v7. I don’t have anything against JDK7 and would prefer to use it. However, my primary CMS is locked into JDK6, and JDK7 makes it very sad.
What I generally do for things like the JDK, Maven, MySQL, etc. is to put it through the Noobie Initializer of Dooooom:
- Unpack the tar/zip/suitcase to my /opt folder
- rename the folder to “<appname>-<version number>
- create a symbolic link to the app-version folder of my choosing
- add “export <app short name>_HOME=/opt/<symlink>” to my .bashrc
- add “…:$<app short name>_HOME/bin” to my path in .bashrc
This allows me the flexibility to swap out different versions so that I can evaluate new releases with my software easily without wrestling with the package mangler. So far, I haven’t had any adverse issues with this process and the only caveat would be that I need to proactively seek out updates that may occur. Since my current production/prod-like apps use the current version, I am slow to move to the next version without compelling, motivating factors like death, dismemberment or hunger. However, I still check to see where I am at at least once a month or sooner if the mood strikes me.
Here’s a list of what I run with this method: