The Artima Developer Community
Sponsored Link

Java Buzz Forum
Tomcat 5 on Fedora Core 6: In Five Easy Steps

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Weiqi Gao

Posts: 1808
Nickname: weiqigao
Registered: Jun, 2003

Weiqi Gao is a Java programmer.
Tomcat 5 on Fedora Core 6: In Five Easy Steps Posted: Jan 14, 2007 6:59 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Weiqi Gao.
Original Post: Tomcat 5 on Fedora Core 6: In Five Easy Steps
Feed Title: Weiqi Gao's Weblog
Feed URL: http://www.weiqigao.com/blog/rss.xml
Feed Description: Sharing My Experience...
Latest Java Buzz Posts
Latest Java Buzz Posts by Weiqi Gao
Latest Posts From Weiqi Gao's Weblog

Advertisement

Have you noticed anything different about this blog in the past 24 hours?

I moved it to my newly upgraded Fedora Core 6 workstation yesterday. And I'm happy to report that setting Tomcat up on a Fedora Core 6 is extremely easy. I'll outline the steps I took to set up a functional Tomcat 5 server:

Install FC6 and Apache Web Server

Stick the Fedora Core 6 DVD in and reboot. Then follow the instructions. I took all defaults where I can, including letting it "delete all Linux partitions" and automatically partition the disk. I choose to install "Web Server" and "Development Tools" when offered the chance. This installs the Apache Web Server 2.2.3 on the box.

Install Tomcat

Tomcat 5 is included in Fedora Core 6, but not installed by default. So I have to bring it in from the repository:

[root@gao]# yum install tomcat5 tomcat5-webapps tomcat5-admin-webapps

This installs Tomcat 5.5.17 and a lot of their dependencies onto the system.

Hook up Tomcat 5 with Apache Web Server

Since I don't want my users to have to type ":8080" all the time, I went ahead and hooked up Tomcat 5 to httpd. In the past, this step had been the most confusing. I remember spending days browsing through Tomcat's website trying to figure out which one of the three alternatives offered there is the one that worked. I still have the mod_jk.so that I compiled from CVS source somewhere on by backup CD-ROMS.

In Fedora Core 6, things are quite straightforward because the version of httpd included contains mod_proxy_ajp which allows httpd to talk to Tomcat 5 through the AJP protocol, which Tomcat 5 listens to on port 8009. To make the connection, I edited /etc/httpd/conf.d/proxy_ajp.conf so that it reads (excluding comments):

[root@gao]# cat /etc/httpd/conf.d/proxy_ajp.conf
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
ProxyPass /blog ajp://localhost:8009/blog

Turn on the services

To have httpd and Tomcat 5 start automatically upon reboot, I went to the System->Administration->Services menuitem and enabled both the httpd and tomcat5 services.

Now I have a working Tomcat 5 server. It's webapps directory is at /usr/share/tomcat5/webapps.

Install Sun JDK

So far we have been using the default Java package that came with Fedora Core 6, which is a Free Software implementation of Java based on GNU Gcj, GNU Classpath, and the Eclipse compiler. To run the widest set of Java applications and servlets, I need to install the Sun JDK.

The best way of installing Sun JDK on Fedora Core 6 is to follow the JPackage.org method. I wrote an Introduction to JPackage.org 782 days ago. Things haven't changed much since then (except that now Fedora Core includes a bunch of Java packages, which makes my life easier).

To follow the JPackage.org method, I need to make sure that the following packages are installed:

[root@gao]# yum install jpackage-utils rpm-build libXp unixODBC unixODBC-devel

The first two were already installed when I checked. The others are needed by the JDK.

Then I need to download the JDK (Linux self-extracting file) from Sun's website.

Now we are five command lines away from success:

[root@gao]# rpm -ihv http://mirrors.dotsrc.org/jpackage/5.0/generic/\
non-free/SRPMS/java-1.5.0-sun-1.5.0.10-2jpp.nosrc.rpm
[root@gao]# cp jdk-1_5_0_10-linux-i586.bin /usr/src/redhat/SOURCES
[root@gao]# rpmbuild -ba /usr/src/redhat/SPECS/java-1.5.0-sun.spec
[root@gao]# cd /usr/src/redhat/RPMS/i586
[root@gao]# for x in java-1.5.0-sun-*.rpm; do rpm -ihv $x; done

Read: Tomcat 5 on Fedora Core 6: In Five Easy Steps

Topic: Command line xpath script Previous Topic   Next Topic Topic: New in Pulse 1.2: Integration with Fisheye/Trac/ViewVC

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use