tags:

views:

378

answers:

4

Hello I am looking to install Apache-Tomcat on a RedHat linux and I am interested if there is a standard place for this to be installed. in other work I have seen tomcat installed at

/opt/apache-tomcat-[VERSION]/

but I would expect it to be found under /usr. Best answer will have a link to authoritative site.

Thanks so much,

David.

+4  A: 

I don't know if there's such a thing as an "official" place, but a reasonable thing to do would be to do what you've done and refer to tomcat through a softlink at /usr/local/tomcat or some such, which would allow you to upgrade versions by simply installing a new version in opt and changing the softlink.

Steve B.
+2  A: 

It depends on who you ask, but I see it this way:

/opt is typically for third-party add-on software. /usr/ is often for 'system' software. User compiled apps go in /usr/local.

I put tomcat in /opt/apache-tomcat-VERSION. I then make a symlink to it as /opt/tomcat.

The Linux Standards Base may have more info on the matter.

Andy
A: 

I'm fairly certain it doesn't matter.

Just like most well-behaved Java apps look for the *JAVA_HOME* environment variable to locate the preferred Java installation, once you've set *CATALINA_HOME* in either .bashrc or .profile of the affected users, software needing to locate Tomcat should be able to find it.

spligak
+1  A: 

There's a Red Hat RPM package for Tomcat 6 - just "yum install tomcat6" and it will put everything in the right place for you and fix up the security by running Tomcat as a dedicated user (not to mention taking care of updates and patches by putting Tomcat into the RPM repository).

Most of the executables, the configuration and the webapp directory end up under /var/lib/tomcat6 using this method.

gareth_bowles