How to Install Apache Tomcat Web App Server in 10 Minutes

How to Install Apache Tomcat on Mac OS X Snow Leopard

This tutorial will guide the user through the steps of installing Apache Tomcat on Mac OS X.

Prepare the Mac OS X to use the cURL command as Wget : Open a Terminal Window (Applications -> Utilities -> Terminal) and add wget as an alias for curl to the bash_profile file with the following command. Close the Terminal Window when complete.

# Add the wget alias for curl to the end of the bash_profile file
#----------------------------------------------------------------------------#
echo 'alias wget="curl -O"' >> ~/.bash_profile

Apache Tomcat Web App Server

Apache Tomcat is developed in an open and participatory environment and released under the Apache License version 2. Apache Tomcat is intended to be a collaboration of the best-of-breed developers from around the world. There is an open invitation to participate in this open development project. To learn more about getting involved, click here.

Apache Tomcat powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations. Some of these users and their stories are listed on the PoweredBy wiki page.  Learn more here.

Mac OS X Snow Leopard

Mac OS X is renowned for its simplicity, its reliability, and its ease of use. So when it came to designing Snow Leopard, Apple engineers had a single goal: to make a great thing even better.  Learn more here.

7 Steps for Installing Tomcat on Mac OS X

Open a Terminal Window and follow these seven steps to install and configure Tomcat on Mac OS X. Application developers can download Tomcat and configure it with various editors, but the method described here can save time and reduce mistakes. This method also supports remote installation. The steps described here, with a modification to step six, can be used to remotely install Tomcat on Unix based systems. This is helpful in “Cloud Computing” environments.

#----------------------------------------------------------------------------#
# 1. ) Navigate to your "projects" directory
# The path for this guide is "/projects/", but the reader's path may be different.
#----------------------------------------------------------------------------#
cd /projects
#----------------------------------------------------------------------------#
# 2. ) Create a new directory named "tomcats" and navigate into "tomcats"
#----------------------------------------------------------------------------#
mkdir tomcats
cd tomcats
#----------------------------------------------------------------------------#
# 3. ) Download Apache Tomcat
# Note: Visit http://tomcat.apache.org to get the URL of the needed version of Tomcat
#----------------------------------------------------------------------------#
wget http://apache.cs.utah.edu/tomcat/tomcat-7/v7.0.10/bin/apache-tomcat-7.0.10.tar.gz
#----------------------------------------------------------------------------#
# 4. ) Unpack Tomcat and delete apache-tomcat-7.0.10.tar.gz
#----------------------------------------------------------------------------#
tar -xzvf apache-tomcat-7.0.10.tar.gz
rm apache-tomcat-7.0.10.tar.gz
#----------------------------------------------------------------------------#
# 5. ) Rename "apache-tomcat-7.0.10" to "tomcat"
#----------------------------------------------------------------------------#
mv apache-tomcat-7.0.10 tomcat
#----------------------------------------------------------------------------#
# 6. ) Edit "tomcat/bin/startup.sh" to add JAVA_HOME
#----------------------------------------------------------------------------#
nano tomcat/bin/startup.sh
# Add the following line after the one that starts with EXECUATBLE:
# export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
# Save changes, press Ctrl+o ; return ; Ctrl+x
# Note: Application developers can browse "/System/Library/Frameworks/JavaVM.framework/Versions"
# and substitute the appropriate version of Java
#----------------------------------------------------------------------------#
# 7. ) Start Tomcat
#----------------------------------------------------------------------------#
sh tomcat/bin/startup.sh
#----------------------------------------------------------------------------#
# Open a web browser and navigate to http://localhost:8080
# Tomcat can be shut down with sh tomcat/bin/shutdown.sh
#----------------------------------------------------------------------------#

Apache Tomcat App Server Successfully Installed on Mac OS X

Open a web browser and navigate to http://localhost:8080 Application developers should see the main Tomcat page displayed in their web browser.

How to Access Tomcat Virtual Host Manager

Application developers should also configure authorization for the Tomcat Virtual Host Manager.

How to Access Tomcat Application Manager

Application developers should also configure authorization for the Tomcat Application Manager.

How to Configure Authorization for Tomcat Administrators

Go back to the Terminal Window and edit “tomcat/conf/tomcat-users.xml” to add roles and users to “tomcat-users” that can access the Tomcat Administrator areas.

#----------------------------------------------------------------------------#
# 1. ) edit "tomcat/conf/tomcat-users.xml"
#----------------------------------------------------------------------------#
nano tomcat/conf/tomcat-users.xml
# Save changes when complete, press Ctrl+o ; return ; Ctrl+x
#----------------------------------------------------------------------------#






#----------------------------------------------------------------------------#
# 2. ) Restart Tomcat to apply changes in configuration
#----------------------------------------------------------------------------#
sh tomcat/bin/shutdown.sh
sh tomcat/bin/startup.sh
#----------------------------------------------------------------------------#

Apache Tomcat Web Application Manager

Authorization has now been configured for the Tomcat Application Manager.

Apache Tomcat Virtual Host Manager

Authorization has now been configured for the Tomcat Virtual Host Manager

Tomcat Mac OS X Resources

How to Install Zend Framework

What are Frameworks?

A Framework is a collection of reusable items or steps in a repeatable process.  A software application framework is a well-defined Application programming interface (API) that serves as abstraction layers that separate business logic from application logic.  Application frameworks usually leverage object-oriented programming techniques to extend the current purpose to serve custom needs.  Combining server-side frameworks with client-side frameworks improves development time and reduces cost while supporting the concepts of Rapid Application Development (RAD).  A popular framework architectural pattern is Model-View-Controller (MVC).  The MVC architectural pattern increases application flexibility and reduces the complexity in architectural design by decoupling models and views.

What is Zend Framework?

The Zend Framework extends the art & spirit of PHP, Zend Framework is based on simplicity, object-oriented best practices, corporate friendly licensing, and a rigorously tested agile codebase. Zend Framework is focused on building more secure, reliable, and modern Web 2.0 applications & web services, and consuming widely available APIs from leading vendors like Google, Amazon, Yahoo!, Flickr, as well as API providers and cataloguers like StrikeIron and ProgrammableWeb.

Installing Zend Framework

Connect to your server with a command line tool like PuTTY, Apple Mac users can simply use a Terminal window.  Navigate to a directory that is NOT the Document Root or any directory in the web server’s “include” path.  The Zend Framework installation described here will allow the user to change the version of Zend Framework at will by using a symbolic link for the Zend installation files.  This method will allow developers to change versions “on-the-fly” without the need for restarting web servers.  Learn how to setup a web server at “How to Setup a Virtual Web Server in 10 Minutes“.

Install Zend Framework with Wget

# 1. ) Get file package from site.
wget http://framework.zend.com/releases/ZendFramework-1.11.4/ZendFramework-1.11.4.tar.gz
# 2. ) Decompress the file.
tar -xzvf ZendFramework-1.11.4.tar.gz
# 3. ) Delete the compressed file.
rm ZendFramework-1.11.4.tar.gz
# 4. ) Rename installation directory to "ZendFramework"
mv ZendFramework-1.11.4 ZendFramework

Install Zend Framework with Subversion

# 1. ) Get file package from site.
svn checkout http://framework.zend.com/svn/framework/standard/branches/release-1.11/
# 2. ) Rename installation directory to "ZendFramework"
mv release-1.11 ZendFramework

Zend Framework Web Server Integration

Use the wGet or Subversion method above to get the package files, then integrate the framework into the existing web server with the following steps.

# 1. ) Create a symbolic link named "Zend" to the "ZendFramework" directory.
# This step will allow changing versions of Zend Framework without the need for restarting the web server.
ln -s ZendFramework Zend
# 2. ) Add the Zend library to your PHP include path
cd /{full}/{path}/{to php.ini folder}
vi php.ini
# Search for the "include_path" directive and update it to include full path to "Zend/library"
# include_path = ".:/php/includes:/{replace this with complete path to parent of Zend symbolic link}/Zend/library"
# Save file and quit editor
:wq
# 3. ) Add Zend Tool to the command line by creating an alias in bash_profile
vi ~/.bash_profile
alias zf=/{replace this with complete path to parent of Zend symbolic link}/Zend/bin/zf.sh
# Save file and quit editor
:wq
#Exit and completely close command window
#Open command window and start a new session
# 4. ) Display zend version by entering this at the prompt
#This should return Zend Framework Version: 1.11.4
zf show version
# 5. ) Create a Zend Project
#Navigate to parent directory of Document Root
zf create project quickstart
# 6. ) Automatically write code using Zend Tool
# The following commands will add basic actions to Index
zf create action add index
zf create action edit index
zf create action delete index
# 7. ) Move the project’s “pubic” folder into  Document Root of Web Server as “quickstart”
# Note: Replace "public_html" with the real name of document root folder
mv quickstart/public public_html/quickstart
#Navigate into “public_html/quickstart”
cd public_html/quickstart
# 8. ) Update "APPLICATION_PATH" value in index.php
# This should point to "quickstart/application" in parent of document root.
vi index.php
// Define path to application directory
defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../quickstart/application'));
# Save file and quit editor
:wq
#Open a web browser and navigate to http://{replace this with host name}/quickstart

Welcome to the Zend Framework

Open a web browser and navigate to “http://{replace this with real host name}/quickstart” to see the “Welcome to the Zend Framework” message.

Open a web browser and navigate to “http://{replace this with real host name}/quickstart/index/add” to see a simple message from the code that was automatically written from using the Zend Tool in the previous steps.

Additional tips and information is available from Zend’s Quick Start Guide.  Software developers can also use Eclipse for application development with Eclipse plug-ins supporting this framework or Zend Studio.  Adobe Dreamweaver users can support Zend in their IDE as outlined in this article “Using Adobe Dreamweaver to color code modules, zend templates, & other file types“.

Software Integration Summary

  • Improved Security by storing sensitive information such as database user name and password in configuration files outside of document root.
  • Provided Version Control by using a symbolic link to software package.  Software developers not using Subversion can change the version of the software by downloading the required version into a new directory and update the Zend symbolic link to point to the new directory.  Software developers using Subversion can manage the software with simple Subversion  Commands and Scripts.
  • Automatic Code Generation by configuring and using Zend Tool to automatically generate code.
  • Integrated by integrating this software into an existing web server environment, developers can leverage existing IT investments.  This server-side framework can also be integrated with a client-side framework to support AJAX and Web 2.0 Technologies across multiple devices.  Here are 3 AJAX Frameworks that can support Custom Dashboards on Apple iPads.

Web 2.0 Summit: The Future Strategy of Web Technologies

Web 2.0 Summit: Points of Control

More than any time in the history of the Web, incumbents in the network economy are consolidating their power and staking new claims to key points of control.  The Web 2.0 Summit, hosted by John Battelle ( @johnbattelle ) and Tim O’Reilly ( @timoreilly ) was packed with brilliant thoughts from intelligent leaders in the web / business space.  New business innovators from Google, Twitter, Facebook, Baidu, and many other properties in the global web space eagerly shared their current insights and ideas about the future.  This year’s theme was about Points of Control, as you can see in this interactive Points of Contorl Map.  You can learn more about this map here.  Thanks to O’Reilly Meida for another great event.

Web 2.0 Summit: Points of Control

Five Key Strategies From The Web 2.0 Summit

  1. Go Social/Mobile or Become Irrelevant
  2. Build A Diverse Empire, Measure, Refine
  3. Learn Everything You Can About Social Behavior
  4. Share Value of Collective Intelligence
  5. Focus on User Experience

Fav Five Web 2.0 Summit Videos

Web 2.0 Summit (formerly named Web 2.0 Conference) brings the intelligence, innovation, and leadership of the Internet industry together in one place at one time. Through incisive plenary sessions, frank onstage conversations, rapid-fire “high order bits,” and Launch Pad, visionaries and executives from across the Internet economy present their unique perspective on the Web’s future. Web 2.0 Summit is brought to you in partnership with O’Reilly Media, Inc. and TechWeb and moderated by John Battelle, Program Chair, and O’Reilly CEO and founder, Tim O’Reilly in association with Federated Media.  You can see all the Web 2.0 Summit videos here.  I have included five of my favorite videos below.

Web 2.0 Summit 2010: “A Conversation with Google’s Eric Schmidt”

Watch the conversation with Google’s Erick Schmidt video here.

Web 2.0 Summit 2010: “A Conversation with Facebook’s Mark Zuckerberg”

Watch this conversation with Facebook’s Mark Zuckerberg video here.

Web 2.0 Summit 2010: “A Conversation with Twitter’s Evan Williams”

Watch this conversation with Twitter’s Evan Williams video here.

Web 2.0 Summit 2010: Mary Meeker on “Internet Trends”

Watch this “Internet Trends” presentation by Mary Meeker video here.

Web 2.0 Summit 2010: Zynga’s Mark Pincus on “Playing for High Stakes in the New App Economy”

Watch this Social Gaming presentation by Zynga’s Mark Pincus here.

Fav Five Places

  1. Live Blogging Baidu CEO Robin Li At Web 2.0 Summit
  2. The TechCrunch Guide to the Web 2.0 Summit
  3. Google CEO: Android update “could replace credit cards”
  4. Web 2.0 Summit November 15-17 San Francsico, Part 6–Mark Zuckerberg Keynote Interview
  5. Web 2.0 Summit focuses on mapping Net economy’s ‘points of control’

Web 2.0 Expo: The Future of the Web, A Platform Strategy

You can learn how to use persuasive design to encourage positive user behavior and more from these Web 2.0 Expo videos here.

Picture 18

Fav Five Faces

Who is on your “Fantasy Innovation Team” this week?

Here are amazing people that have connected me to new friends and new ideas this week. You might be familiar with “Fantasy Football Teams” , well this is my “Fantasy Innovation Team” this week. I recommend following these smart, creative people on Twitter.

timoreilly-twitter Founder and CEO, O’Reilly Media. Watching the alpha geeks, sharing their stories, helping the future unfold. http://twitter.com/timoreilly
johnbattelle-twitter Media, Technology, Culture, Business http://twitter.com/johnbattelle
ev-twitter Farm boy from Nebraska. Husband and father. Co-founder of Twitter. http://twitter.com/ev
ericschmidt-twitter CEO Google http://twitter.com/ericschmidt
timberners_lee-twitter Director of the World Wide Web Consortium (W3C) w3.org, the place to agree on web standards. Founded new webfoundation.org – let the web serve humanity http://twitter.com/timberners_lee

Facebook is not 500 million

Facebook is not 500 Million People

A popular quote from the Enterpirse 2.0 Conference in Santa Clara was:

“Facebook is not 500 Million People, its 500 Million Networks

This is a very important point to understand.  A network of netowrks helps us discover the strength of weak ties, discussed in this white paper [pdf]  THE STRENGTH OF WEAK TIES: A NETWORK THEORY REVISITED Mark Granovetter.

Amy Shuen, author of “WEB 2.0 A STRATEGY GUIDE” does a great job explaining the value of “Network Effects” in this video.

You can see more of Amy’s videos and my review of her book at “WEB 2.0 A STRATEGY GUIDE“.

You can learn more about Web 2.0 and Business Strategy at the Web 2.0 Summit.

Picture 22

Happy Fav Five Friday!

Fav Five Places

Fav Five Faces

Who is on your “Fantasy Innovation Team” this week?

Here are amazing people that have connected me to new friends and new ideas this week. You might be familiar with “Fantasy Football Teams” , well this is my “Fantasy Innovation Team” this week. I recommend following these smart, creative people on Twitter.

frogpond-twitter the way to Enterprise 2.0 seen from the eyes of a collaboration consultant, (geek) and you name it http://twitter.com/frogpond
AndrewPWilson-twitter Do. Learn. Improve. Repeat. Note: These are my views and my voice alone – no broader implications implied http://twitter.com/AndrewPWilson
rawn-twitter Understand social software adoption, metrics and value. Author Social Networking for Business http://bit.ly/2eOmwc. My thoughts not those of IBM. http://twitter.com/rawn
jennylovett-twitter Public Relations, Communications, Information Operations, U.S. Air Force, Writer – Love politics, news, music, recycling, Marble Slab & Panera Bread http://twitter.com/jennylovett
Hal_Good-twitter Government procurement director, acquisition, Gov2.0, leadership, construction, contracting, sustainability, green, supplychain, innovation http://twitter.com/Hal_Good