Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

developerWorks Community:

  • Close [x]

Install and configure a development Web server in UNIX

Build a fast, functional, and free Web server while jump-starting your UNIX skills

Matthew Skamser, Software Consultant, Solution Destination, Inc.
author photo
Matthew L. Skamser is an IT consultant and Studio B author with more than 10 years of experience architecting, administering, troubleshooting, and tuning Web applications in enterprise server environments. His clients have included IBM, Lockheed Martin/United States Air Force, and WorldBank. He has multiple IBM Certified Systems Expert certifications and received his bachelor's degree in Computer Information Systems from Northern Arizona University. You can reach Matthew at matt@solutiondestination.com.

Summary:  Get a detailed, step-by-step approach to installing and configuring a development or test Apache Tomcat server. Along the way, pick up helpful tips on how to build and administer your Web or application server in a UNIX® environment.

Date:  15 Jul 2008
Level:  Intermediate PDF:  A4 and Letter (358 KB)Get Adobe® Reader®

Activity:  29066 views
Comments:  

Tomcat and UNIX

The goal of this tutorial is not to give you an authoritative guide to all things related to Tomcat but rather to get you up and running with a great base foundation of knowledge regarding your stand-alone development or test server environment. When you have such a foundation, you can expand it into a full-blown enterprise environment, if you so desire.

Why Tomcat?

Why should you use Tomcat instead of one of the alternatives, such as JBoss, Geronimo, or WebSphere Application Server Express?

Tomcat version 6 by itself is a lightweight solution. It does not come with all the Java Platform, Enterprise Edition (Java EE) features and additional packages found in JBoss, Geronimo, and IBM WebSphere® Application Server Express, but it also doesn't require much memory and runs fast even on smaller servers. Plus, it is available at no cost.

Tomcat is a JavaServer™ Pages (JSP)/servlet container that supports only basic Java application server features. It lacks the scalability and Java EE version 5 compliance, which is why it is only rarely used in production environments.

If you're looking to use your new server in an enterprise environment, the more obvious UNIX flavors are AIX and Solaris. In fact, Solaris has the highest percentage of enterprise market share. Other UNIX choices include FreeBSD and Mac OS X.


The UNIX and Windows® installations of Tomcat

It is possible to run the examples in this tutorial on a Windows computer. The Apache community did the courteous thing after years of catering only to UNIX by developing for the Windows platform. However, depending on which statistics you're checking, Apache Web Server and subsequent products are used in more than 90% of Web server architectural solutions. Without getting into too much detail, UNIX offers the stability, security, and simplicity of a pure multi-user operating system that Windows Server® operating system just haven't matched.

That said, if you decide to use Windows, there are a few differences in Tomcat setup between UNIX and Windows that you should note before moving on:

  • Extracting the initial installation files on a UNIX server will probably require bzcat, gunzip, and tar, or gtar. A Windows Server machine typically uses WinZip or a similar utility.
  • PATH setup is more overt on a UNIX server. Windows still uses pathing, but much of that is behind the scenes or automatic when installing software.
  • Permissions considerations are more important in the UNIX setup and configuration. The great security strength of UNIX servers is also the single biggest cause for problems: permissions problems. When initially installing software, you need proper permissions to write that software into the base operating system's file systems—/var, /tmp, and so on. Furthermore, always be aware of permissions considerations when connecting various internal and external software components to your UNIX server. Always take IDs, groups, and proper access into consideration.
  • In Windows, installation is graphical user interface (GUI) based, while UNIX traditionally uses the command-line interface (CLI). This is changing somewhat with the Gnome and other graphical environments, including the increasingly popular Mac OS X version 10.5 Leopard. However, purists will always swear by the CLI. Besides, it's the best way to learn.
  • Windows uses .bat files for automated batch processes and .exe files for executables. UNIX uses .sh or .ksh extension files by default for executable scripts, and so on. The .sh or .ksh format depends on which shell you're using.

Tomcat versions

With numerous fixes included in every release, tweaks, new features, or new ways perform old tasks, it's sometimes difficult to decide which software version to go with. In Tomcat, you're faced with the same problem. I recommend looking at the details in Table 1 to match up your administrative server to the J2EE specification for which the application you're deploying was coded.


Table 1. JSP specs in relation to Tomcat versions
JSP specificationTomcat version
2.5/2.16.0.x
2.4/2.05.5.x
2.3/1.24.1.x
2.2/1.13.3.x (archived)

Another not-so-technical way of deciding between software versions is to stick to using the latest stable version of the software you want to work with. Usually, you get all the latest security fixes and functionality.

2 of 11 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX
ArticleID=320065
TutorialTitle=Install and configure a development Web server in UNIX
publish-date=07152008
author1-email=matt@solutiondestination.com
author1-email-cc=mmccrary@us.ibm.com