How to Install Apache Tomcat on Windows 7 64 Bit

Home » Articles » Misc » Here

Apache Tomcat 7 Installation on Windows

This article provides information about the installation and basic configuration of Apache Tomcat 7 on Windows.

  • Downloads
  • Installation
  • Running Tomcat as a Service
  • Enabling HTML Management Access
  • Configuration Files
  • Deploying Applications

Related articles.

  • Apache Tomcat Installation on Linux (RHEL and clones)
  • Linux HTTP and FTP Server Configuration (RHCSA)
  • Linux HTTP Server Configuration (RHCE)
  • Apache : Reverse Proxy Configuration

Downloads

The Java 1.7 JRE and the binary distribution of Tomcat 7 for Windows is available from the links below.

  • Java 1.7 JRE
  • Tomcat 7 Downloads

Installation

Install the Java 1.7 JRE as directed by the Web page linked above. You can use the default options for everything, but you may want to uncheck the installation of the browser toolbar.

Unzip the Tomcat 7 software into an appropriate location. In this case I unzipped it into the "D:\apache-tomcat-7.0.33" directory. This directory is known as the CATALINA_HOME.

Create a file called "D:\apache-tomcat-7.0.33\bin\setenv.bat" with the following contents, adjusted to your installation locations.

set "JRE_HOME=%ProgramFiles%\Java\jre7" set "CATALINA_HOME=D:\apache-tomcat-7.0.33" exit /b 0

You can now start and stop Tomcat using the following scripts.

%CATALINA_HOME%\bin\startup.bat %CATALINA_HOME%\bin\shutdown.bat

The default page is visible on port 8080, so on the server itself you can access it using this URL "http://localhost:8080".

Remember to unblock the port on the firewall if you want to access the site from other servers on the network.

Running Tomcat as a Service

Running Tomcat as a service is very simple. From the command prompt, change directory to the "%CATALINA_HOME%\bin\" directory and run the following command.

service.bat install

If you want you can set the environment variables before calling the command, but for a single installation of Tomcat, this is not necessary.

set "JRE_HOME=%ProgramFiles%\Java\jre7" set "CATALINA_HOME=D:\apache-tomcat-7.0.33" service.bat install

The service can now be started and stopped from the Service dialog, or the command line.

C:\> net start "Apache Tomcat 7" C:\> net stop "Apache Tomcat 7"

Enabling HTML Management Access

Edit the "%CATALINA_HOME%\conf\tomcat-users.xml" file, adding a new role and user with admin privileges.

<role rolename="manager-gui"/> <user name="tomcat" password="password" roles="manager-gui" />

Restart Tomcat for the configuration to take effect.

%CATALINA_HOME%\bin\shutdown.bat %CATALINA_HOME%\bin\startup.bat  Or  C:\> net start "Apache Tomcat 7" C:\> net stop "Apache Tomcat 7"

The management application is now available from the "http://localhost:8080/manager/html" URL.

Configuration Files

The main locations of configuration and log information are shown below.

Release Notes        : %CATALINA_HOME% Bin Directory        : %CATALINA_HOME%\bin Webapps              : %CATALINA_HOME%\webapps Logs                 : %CATALINA_HOME%\logs

Deploying Applications

You can get a sample application WAR file to test with from "http://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/".

If this is a redeployment, delete the existing deployment from the "%CATALINA_HOME%\webapps" directory. Place the "sample.war" file in the "%CATALINA_HOME%\webapps" directory and Tomcat with automatically deploy it. You will see a "sample" directory appear.

You don't need to stop and start Tomcat for this to work, but you can if you want.

For more information see:

  • Apache Tomcat
  • Windows service HOW-TO
  • Linux HTTP and FTP Server Configuration (RHCSA)
  • Linux HTTP Server Configuration (RHCE)
  • Apache : Reverse Proxy Configuration

Hope this helps. Regards Tim...

Back to the Top.

How to Install Apache Tomcat on Windows 7 64 Bit

Source: https://oracle-base.com/articles/misc/apache-tomcat-7-installation-on-windows

0 Response to "How to Install Apache Tomcat on Windows 7 64 Bit"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel