[CentOS] Setting up Tomcat as a service under CentOS 4?

Jim Perrin jperrin at gmail.com
Sat Oct 29 05:03:25 UTC 2005

On 10/28/05, Preston Crawford <me at prestoncrawford.com> wrote:
> I've found about a dozen different ways to skin this cat (no pun
> intended). Everything from creating a script in /etc/init.d/ to using
> jsvc. I was hoping someone out there, those of you out there who run
> Tomcat in this manner, how did *you* set this up? I can't seem to get it
> right. Any help would be greatly appreciated. Or even direction to an
> authoritative document.

Couple things you can do here. I would get the java-sun nosrc.rpm from
jpackage (
 ) and the java sdk bin from
http://java.sun.com/j2se/1.4.2/download.html (yes 1.4.2 is older, but
it's what the rest of the stuff I'm going to link you to is built
against. It's easier this way)

after that, set up an rpmbuild environment (
http://rpm.org/hintskinks/buildtree/ ) put the java sdk bin in
SOURCES, and rpmbuild --rebuild the java nosrc.rpm  Install the java
rpms this built, which should be located in RPMS/i586

After all that fun, go to redhat's ftp site, and get the iso for the
applications server. It's a free download, no license costs...
(ftp://ftp.redhat.com/pub/redhat/linux/enterprise/4/en/RHAPS2/) get
the one for your particular arch,  extract the contents to a local
directory, and run createrepo on it to generate some yum information
for it. then add an apps.repo file to your /etc/yum.repos.d/ with
contents similar to below:

name=Application repo

Import the GPG-RPM-KEY on the applications iso, and then 'yum install
tomcat5". There will be several tomcat type rpms. The usual yum
commands will show them.
Jim Perrin
System Administrator - UIT
Ft Gordon & US Army Signal Center

More information about the CentOS mailing list