LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-04-2008, 06:41 AM   #1
rholme
Member
 
Registered: May 2008
Posts: 47

Rep: Reputation: 15
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
 
Old 06-04-2008, 08:21 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,283

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Personally I recommend using your distros pkg mgr instead of making from tarballs (if possible).
All the hard work is done for you, inc dependencies.
 
Old 06-05-2008, 06:31 AM   #3
rholme
Member
 
Registered: May 2008
Posts: 47

Original Poster
Rep: Reputation: 15
You are right, but sometimes this is NOT an option. Now if only the pkg manager cleaned up well too!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Tomcat 5.5 install issues. brave heart Red Hat 4 08-05-2007 09:46 PM
apache-tomcat and jakarta-tomcat shifter Programming 1 07-28-2007 10:36 PM
LXer: Install TomCat 5.5 with Apache Portable Runtime on Linux LXer Syndicated Linux News 0 09-30-2006 07:33 PM
[Gentoo] Minor problems post-install (esp. ATI) Comrade Chez Linux - Distributions 4 01-06-2006 08:05 AM
Install tomcat as a module of Apache for running JSP kernelvn Linux - Networking 1 09-27-2004 11:41 PM


All times are GMT -5. The time now is 12:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration