[rhelv6-beta-list] tomcat 6 with redhat 6

Scott Dowdle dowdle at montanalinux.org
Fri Jul 16 15:25:23 UTC 2010


Greetings,

----- Original Message -----
> On 16/07/2010 12:30, Nico Kadel-Garcia wrote:
> > I got involved with this in RHEL 5, and using the JPackage repository,
> > and fortunately RHEL has included tomcat 6 for the new RHEL 6 beta.
> > Why don't you simply grab the SRPM and recompile from that, if you
> > want to make updates or changes, or use the binary if you don't? This
> > process is already integrated into that RPM and you can save yourself
> > a lot of work over trying to re-architect the layout manually. That's
> > what RPM's are *for*.
> >
> Presumably you have this running then?
> 
> Any chance of telling me which files need to be altered where and why so
> that I can get an instance running? That's all I'm really after. I know
> rpms make life easy that's why I want to use it.

I haven't tried it but if it is like it is in Fedora you can just yum install it and it'll bring in all of the dependencies... and should have a service control script just like all other services on the system.

chkconfig --list {servicename}
chkconfig {servicename} on
service {servicename} start

In this case {servicename} would probably be tomcat6.

I recently got tomcat6 running on Fedora 12 and I'm sure there may be difference in the package provided with RHEL6... but just in case you found it useful, here is a cheatsheet I came up with for the particular use case I had.  I'm pretty much a tomcat6 newbie so don't ask me anything. :)

- - - - -

# Setting up tomcat on Fedora 12 x86_64

# Install the packages
yum install tomcat6 (add additional packages as desired)

# Basic configuration, by default it is standalone and runs on port 8080
chkconfig tomcat6 on
service tomcat6 start
nano -w /etc/tomcat6/tomcat-users.xml (enable account and change password)

# Setup userdirs for .jsp
nano -w /etc/tomcat6/server.xml (add following section)
<Listener className="org.apache.catalina.startup.UserConfig"
    directoryName="public_html"
    userClass="org.apache.catalina.startup.PasswdUserDatabase"/>
service tomcat6 restart
# You can now browse to
http://hostname:8080/~username/filename.jsp


# Setup userdir webapps for servlet
mkdir ~username/public_html/servlet
chown -R username.groupname ~username/public_html/servlet
ln -s ~username/public_html/servlet /var/lib/tomcat6/webapps/username
nano -w /etc/tomcat6/server.xml (add a line for each student/webapp)
<Context path="/username" docBase="username" debug="0" reloadable="true" />
service tomcat6 restart
# You can now browse to
http://hostname:8080/username/webappname (once they deploy a webapp)

- - - - -

TYL,
-- 
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]




More information about the rhelv6-beta-list mailing list