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 Setup a Virtual Web Server in 10 Minutes

Virtual Hosting

Virtual hosting is a method for hosting multiple domain names on a computer using a single IP address. This allows one machine to share its resources, such as memory and processor cycles, to use its resources more efficiently.

Introduction

This article will walk the reader through a few simple steps on how to setup a virtual web server in 10 minutes.  The steps outlined here describe how to install Apache Web Server with the MySQL Database, PHP, & Perl.  This is a tutorial on how to setup a virtual web server on the Apple Macbook Pro, but the same steps apply for a Microsoft Windows computer with a few simple modifications.

The Apple Macbook Pro OS X already comes bundled with a web server.  This Mac OS X web server can be enabled by following the steps outlined in this article, “How to set up a Web Server in Mac OS X Leopard“.

This tutorial will show how to install and configure a virtual web server for web development that can be removed at will.  Web developers experimenting with cutting edge technologies and custom configurations usually need multiple environments.

Please use caution when installing new software on computer systems.  A Best Practice includes creating system backups before changes.

1. How to Install Open Source Software

The good people at Apache Friends have made this step extremely easy.  People can download an Apache distribution containing MySQL, PHP and Perl in the XAMPP package.  Download and install XAMPP by following the steps defined at http://www.apachefriends.org/en/xampp.html

2. Edit the Local Host File

sudo nano /private/etc/hosts

The entries in this file start with something like this:

# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost

add the new server name to the bottom of the list here

127.0.0.1 virtualserver1.dev

Press control-o to save the file, then enter, and control-x to exit the editor.
Flush the DNS Cache to activate changes

dscacheutil -flushcache

3. Update the Virtual Host File

sudo nano /Applications/xampp/etc/extra/httpd-vhosts.conf

This file will look very similar to the text below. Delete everything in this file and add the virtual host information.

    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "/Applications/XAMPP/xamppfiles/docs/dummy-host.example.com"
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-host.example.com-error_log"
    CustomLog "logs/dummy-host.example.com-access_log" common

New Virtual Host File

# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# 
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost 127.0.0.1

    ServerAdmin webmaster@virtualserver1.dev
    DocumentRoot "/projects/virtualserver1/docs/public_html"
    ServerName virtualserver1.dev
    ServerAlias www.virtualserver1.dev
    
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
    
    ErrorLog "logs/virtualserver1-error_log"
    #Don't really need a log file for a local web server
    #CustomLog "logs/webtechman.dev-access_log" common

4. Update the HTTPD Config File

sudo nano /Applications/XAMPP/xamppfiles/etc/httpd.conf

Remove the comment from #Include /Applications/xampp/etc/extra/httpd-vhosts.conf
Original line

#Include /Applications/xampp/etc/extra/httpd-vhosts.conf

Updated line

Include /Applications/xampp/etc/extra/httpd-vhosts.conf

Create a test file for the “Document Root” folder identified in the new virtual host and save it as “index.php”.




 
 
 
 


Hello

5. Viewing The Virtual Environment

Navigate to “/Applications/XAMPP” and run XAMPP Control

Start the database and web server from the XAMPP Control

Open a web browser and navigate to http://localhost and see the default XAMPP page.

Open a web browser and navigate to http://localhost/phpmyadmin/ and see the MYSQL database manager.

Open a web browser and navigate to http://virtualserver1.dev/index.php and see the test page from the new virtual web server.

Adding Additional Virtual Web Servers

Additional virtual web servers can be created by repeating steps 2 & 3.  The new virtual web servers will need unique names, for example: “virtualserver2″, “virtualserver3″, “virtualserver4″, or “mydevserver”.

Fixing MySQL error 13 on Mac OS X 10.6.x: This error usually occurs when the curly quotes are used in the configuration files, which happens when copying and pasting code from the web.  This error can be fixed by changing these “HTML quotes” to normal “quotes”.

Summary

Setting up virtual web servers in the development environment is a very simple task.  Local instances of web server software allows web developers to experiment with features of web applications like WordPress blog software.  The new features can be tested locally before implemented in a production environment.  Each of these virtual environments can be configured to meet custom needs.  Learn more about Apache Web Server Name-based Virtual Hosting here.

Note: The “Document Root” is outside of the web server software installation, which allows replacing the current web server software with something like “Zend Server” without disrupting current web site files.

Top 10 Enterprise Apps for the Apple iPad

The Future of the Enterprise

Putting the Enterprise 2.0 Budget on a Diet

The future of Enterprise 2.0 looks brighter every day.  Organizations are identifying adoption patterns and putting them into practice.  The web is filled with stories on how organizations and governments have used a Web 2.0 Strategy to improve collaboration and communication.  We are also seeing a healthy trend of more interest in Business Intelligence (BI) Apps.  There are many Business Intelligence apps available for the Apple iPhone and more are coming to the Apple iPad.  It would be nice to see this trend continue by organizations putting their Enterprise Platforms on a diet.  This healthy diet should consist of a healthy balance of Web Services, Software as a Service (SaaS), APIs, Apps, Mashups, and a more flexible architecture.  Exercising Service Oriented Architecture (SOA) in Enterprise 2.0 Solutions can lead the way towards “Self-Serving Solutions” aka “The Enterprise App Store”.

Which do you think would be easier and more cost effective?

  • Buying new hardware/software and creating the new solution?
  • Creating an app that can be dropped into your existing platform(s)/device(s)?

Creating the Thought Factory

Organizations have many options when making decisions across multiple points of their Enterprise 2.0 Solution.  I think it’s about time we stop “Reinventing the wheel”.  It’s time we stop reinventing the car of knowledge management and business intelligence.  It’s time to start creating the factory of thought with machines of intelligence that can be measured and configured to deliver fluid collaboration and communication.  It’s time for Enterprise Apps.

We already see examples of Business Intelligence Apps for the new Apple iPad.

iPad in Business

Featuring built-in support for Microsoft Exchange, secure access to corporate data, and a powerful platform for apps, iPad is ready for work, right out of the box.  Learn more here.

apple-iPad-business-apps

Top 10 Enterprise Apps for the Apple iPad

Roambi – Visualizer

Roambi’s cutting edge mobile dashboards let you touch, turn, analyze and share your company’s latest information on any iPhone or iPad – keeping you connected to your business, anytime and anywhere.  Learn more here.

enterprise-apple-ipad-apps-roambi

QlikView

QlikView Business Intelligence software allows you to quickly and easily get answers to business questions.  Learn more here.

enterprise-apple-ipad-apps-qlik-view

GoToMeeting

GoToMeeting is the easiest and most convenient way to attend online meetings – and now you can take it to go! Download the free app and join a meeting on your iPad in seconds just by tapping the link in your invitation email.  Learn more here.

enterprise-apple-ipad-apps-goToMeeting

WebEx for iPad

Attend WebEx meetings on your iPad, wherever you are! Use this application to get the full meeting experience with simultaneous data and audio. Don’t just listen in to a meeting. Join in.  Learn more here.

enterprise-apple-ipad-apps-webex

Keynote

Keynote is the most powerful presentation app ever designed for a mobile device. It’s the application you know and love on the Mac, but completely reworked from the ground up for iPad. It makes creating a world-class presentation, complete with animated charts and transitions, as simple as touching and tapping.  Learn more here.

enterprise-apple-ipad-apps-keynote

Penultimate

The ultimate app for iPad. Stylish, powerful, and easy to use, Penultimate encourages you to take notes, keep sketches, or work through your next breakthrough idea– whether you’re in the office, on the go, or home on the couch.  Learn more here.

enterprise-apple-ipad-apps-Penultimate

Numbers

Numbers is the most innovative spreadsheet app ever designed for a mobile device. It’s the application you know and love for the Mac, completely reworked from the ground up for iPad.  Learn more here.

enterprise-apple-ipad-apps-numbers

Bento for iPad

Organize all the details of your busy life in one iPad app! Bento for iPad comes with 25 ready-to-use database templates that can be easily customized to organize virtually any type of information you have. Manage contacts, track projects, plan events and so much more.  Learn more here.

enterprise-apple-ipad-apps-Bento

Box.net

Box.net is a web-based service that lets you easily share, manage and access all your content from anywhere. Whether you want to store documents, media or other files, Box.net lets you view, share and collaborate on all your files on-the-go.  Learn more here.

enterprise-apple-ipad-apps-box-net

popplet lite

Popplet is a place where you can post, collect and curate your best ideas and random stuff all in one continuous visual space.  Learn more here.

enterprise-apple-ipad-apps-popplet-lite

See This New Augmented Reality App for the Apple iPhone

Apple iPhone AppStore is about to get it’s First Augmented Reality App

AcrossAir creates a very interesting Apple iPhone App.  This amazing new application tells Londoners where their nearest tube station is via their iPhones video function.

When you load the app, holding it flat, all 13 lines of the London underground are displayed in coloured arrows. By tilting the phone upwards, you will see the nearest stations: what direction they are in relation to your location, how many kilometres and miles away they are and what tube lines they are on. If you continue to tilt the phone upwards, you will see stations further away, as stacked icons. Only available to Apple iPhone 3GS users.

AcrossAir

AcrossAir

AcrossAir is working with companies to take advantage of the Apple iPhone platform for everything from fun games to enterprise applications. Our first applications, delivering TV listings for TVGuide.co.uk and our fun game the Fruit Loons, are launching in AppStore in June 2009. Learn more: http://www.acrossair.com/

The first mobile Augmented Reality browser premiers in the Netherlands

A few weeks ago I saw a similar mobile app video on Ross Dawson’s (@rossdawson) blog here.

The World’s First Augmented Reality Browser. Layar is a free application on your mobile phone which shows what is around you by displaying real time digital information on top of reality through the camera of your mobile phone. Learn more: http://www.layar.com/

I would like to see something like this for the Washington DC Metro.  This would also be a nice way to locate the many Washington DC museums.

How could a mobile app help you?