|
a few hard-one useful tips for software install, esp. for Apache/Tomcat
A few administrative lessons here - learned the hard way - 1 generic, 2 apache related
1) most linux/unix products come in tarballs - the revision is part of the top name
e.g. apache-tomcat-5.5.25
and the standard is to install in /opt
(for me symbolically lined to /local where I move /usr/local and then link again
- I like all EXTRA software in one place for backup reasons)
So to make life easier for future upgrades to a new revision, I do this
ln -s /opt/apache-tomcat-5.5.25 /opt/apache
a) any/all local scripts use the name /apache (e.g. cleaning out the logs from crontab)
b) an upgrade just means removing the link and making a new one
so if trouble happens, going back is easy
and if all works fine, then removal of the old is easy with "rm -rf"
Caveats:
a) if (like apache) it is self contained and no external links - NONE
b) if (like many others) there is a "make install" in the script
If the "install", uses "mv" or "cp" - NO problems with update
(but going back if needed, requires make again)
but if the "install" uses symbolic links and puts things in /usr/include /usr/lib ..
you may want to redo the links to use the "short" name
and updates using later shared library revisions may require some additional links
2) APACHE does not like directory symbolic links in the class path - OUCH
- maybe they will fix this some day
BUT symbolic links to ???.jar files work fine
3) APACHE has two important places for jar files
.../apache-tomcat-5.5.25/common/lib (isn't typing ../apache/common/lib easier?)
+ .../apache..../webapps/APPLICATION_NAME/WEB-INF/lib (e.g. /opt/apache/webapps/fubar/WEB-INF/lib)
ONE would think (logically) that you should put jar files common to ALL applications in the former
and specific jars into the latter. NO NO NO, ONE is totally wrong. The top level (common/lib) is
pretty useless to applications - it is only for apache and tomcat. ALL jars files (or symbolic links)
need to be in the WEB-INF/lib for the web application to find them.
AND yes, I highly recommend symbolic links only and putting all jars into one common place
- e.g. /opt/web_jars
THEN upgrades in apache become really easy without lots of messy copying or moving
+ besides symbolic links are cheap
+ if you run more than one webapp, symbolic links get even cheaper
|