English

How To: Install Apache 2.0.58 with Tomcat 5.5.17 with mod_jk using J2SDK 5.0 Update 13 for ArcIMS 9.2/9.3 on Windows 2003/2000/XP (32-bit binaries)

Summary

Instructions provided are for the installation and configuration of Apache 2.0.58 with Tomcat 5.5.17 with mod_jk using J2SE Development Kit 5.0 Update 13 for ArcIMS 9.2 and ArcIMS 9.3 on Windows.

Specific information for the installation of ArcIMS is included with the product's Install Guide.

This installation requires the following software:
· J2SE Development Kit (JDK) 5.0 Update 13
· Apache Web Server version 2.0.58
· Tomcat 5.5.17
· ArcIMS 9.2 or 9.3 Installation DVD

Notes:
A user account that has Administrator rights on the ArcIMS machine is required.

ArcIMS 9.2 is supported with J2SE Development Kit (JDK) 5.0 Update 6 or higher. This document has been updated to provide steps for JDK 5.0 Update 13, which is supported for both ArcIMS 9.2 and 9.3
· Familiarity with certain Windows tasks is required to install and configure ArcIMS. For details, see the following ESRI Knowledge Base article, Common Windows tasks when installing ArcIMS.

· For more information on the acronyms and terms used in this document, see the Glossary of terms used in ArcIMS Installation articles.

· Review and follow steps 1 and 2 from the ArcIMS Installation Guide on the DVD. These two steps ensure that the system meets the minimum requirements and assists in planning the ArcIMS site configuration. To open the ArcIMS Installation Guide, navigate to the DVD in Windows and double-click on Install.htm.

Procedure

Previous versions of ArcIMS must be uninstalled before installing ArcIMS 9.2 or 9.3. The setup program for ArcIMS on Windows prompts for the removal of previously installed versions.

If previous ArcIMS components were distributed among several computers, it is recommended to first remove the components on each computer in the Control Panel's Add/Remove Programs.

Warning:
A supported Web Server and Servlet Engine must be properly installed and configured before running the setup program for ArcIMS.
  1. Uninstall any unsupported versions of Java, Web Server, and Servlet Engine. See: How To: Uninstall ArcIMS-related third-party software on Windows
  2. Install Java 2 Standard Edition Development Kit version 5.0 Update 13.
     
    A. Click J2SE Development Kit (JDK) 5.0 Update 13
    to download Sun Java 2 SDK, Standard Edition, version 5.0 Update 13.

    B. Click 'Download JDK'.

    C. Accept the license agreement.

    D. Click on the download link for the Windows Offline Installation Multi-Language. The file jdk-1_5_0_13-windows-i586-p.exe is downloaded.

    E. Run the installer after it has finished downloading.

    F. Accept all of the default installation options, unless changes are required. This installs both the Java Runtime and Development Kit.

    G. After the install, Navigate to Start > Settings > Control Panel > Java.

    H. Click the 'Update' tab and remove the check mark for 'Check for Updates Automatically'.

    I. Click Apply and close the Java Control Panel.
  3. Install Apache 2.0.58.
    Warning:   
    Prior to installing Apache Web Server, be sure to either uninstall IIS Web Server or change the port of its Default Web site from port 80 to an unreserved port (e.g., port 81). When changing the IIS port number, be sure to restart the IIS Web Server for the change to take effect. Failure to take any of these actions results in a failed Apache Web Server install.
    A. Click Apache Web Server version 2.0.58 and download the file 'apache_2.0.58-win32-x86-no_ssl.msi'.

    B. Navigate to the folder where the file was downloaded and double-click it to run the installation.

    C. At the Welcome screen, click Next.

    D. At the License Agreement screen, read and accept the terms of the license agreement. Click Next.

    E. At the Read This First screen, click Next.

    F. At the Server Information screen, type in the Network Domain, Server Name or computer name and the e-mail address of the administrator.

    G. Select 'for All Users, on Port 80, as a Service -- Recommended'. Click Next.

    H. At the Setup Type screen, select Typical and click Next.

    I. At the Destination Folder screen, accept the default installation location or click Change to specify a different location. Click Next.

    J. At the Ready to Install the Program screen, click Install.

    K. At the Installation Wizard Completed screen, click Finish.

    L. Modify the httpd.conf file. Click Start > Programs > Apache HTTP Server 2.0.58 > Configure Apache Server > Edit the Apache httpd.conf Configuration File.

    M. Locate the line 'DirectoryIndex index.html' and add 'default.htm' and 'default.html' at the end so it reads:
    DirectoryIndex index.html index.html.var default.htm default.html
    N. Save the file and close the window.

    O. Verify that the installation was successful. Open a Web browser and type http://machinename (replace with the server's machinename).

    The Apache page: 'Seeing this instead of the website you expected?' should display. If so, proceed to step 4.

    If the page does not display, proceed to the next step (step P) to ensure that the Apache Web server is running.

    P. Open the Windows Services panel.

    Q. A service named Apache2 should be listed as started. If not, select the Apache2 service and start it by clicking the 'Start Service' triangle in the toolbar.
    Note:
    If the default Apache page still does not display, an error was made during one of the installation steps. Repeat the installation, or check the Apache Documentation. Additional resources on installing the Apache Web Server can be found here.
  4. Install Tomcat 5.5.17.
     
    INSTALL TOMCAT

    A. Click here to access the Jakarta Tomcat 5.5.17 Download site.

    B. Click on apache-tomcat-5.5.17.exe to download the file. Save it on the local machine.

    C. Navigate to the folder where the file was downloaded and double-click apache-tomcat-5.5.17.exe.

    D. Click Next to continue.

    E. Read the License Agreement and click 'I Agree'.

    F. At the Choose Components dialog box, change the type to 'Full' install. Alternatively, add at least the features Service and Examples to the selection.

    G. Click Next.

    H. Select the preferred installation location, for example, the default C:\Program Files\Apache Software Foundation\Tomcat 5.5 or C:\Tomcat5.5

    I. Use the default settings in the Configuration dialog box. Create a new password for the Tomcat Administrator. Click Next.

    J. The path of the JVM installed on the machine should be the location of the Java Standard Development Kit, for example, C:\Program Files\Java\jdk1.5.0_13.
    Browse to this path if it is not set automatically and click OK.
    Warning:   
    If a path to an older SDK version is listed, cancel the Tomcat installation. Make sure that a Java SDK is installed and the environment variables JAVA_HOME and PATH do not include any old entries regarding the Java Runtime Environment or are pointing to the J2SDK location correctly.
    K. Click Install to continue. Click Finish.

    SETUP OF ENVIRONMENT VARIABLES:

    L. Right-click on My Computer and click Properties. Click the Advanced tab. Click on the Environment Variables button.

    M. Under System Variables, click New. When prompted for Variable Name, type JAVA_HOME (case sensitive). For the Variable value, type the path where Java 2 SDK is installed, for example, C:\Program Files\Java\jdk1.5.0_13. Click OK.

    N. Create another system environment variable called CATALINA_HOME (case sensitive). For the Variable value, type the path where Jakarta Tomcat 5.5.17 is installed, for example, C:\Program Files\Apache Software Foundation\Tomcat 5.5 or C:\Tomcat5.5. Click OK.

    O. In the System variables list, scroll to the 'Path' variable, select it, and click Edit. In the Variable Value text box, append the following to the end of the text, including the semi-colon to separate from previous entries:
    ;%JAVA_HOME%\bin.
    Note: 
    Verify that old references to JAVA_HOME in the path variable have been removed, for example, <drive:>\jdk1.3.1 or similar.
    P. Click OK twice to close the Properties window.

    Click here for additional resources on installing the Tomcat Servlet Engine.
  5. Configure Tomcat with Apache Web Server.
     
    A. Click here to download the 'mod_jk-apache-2.0.58.so' (version jk-1.2.20) file.
    - Save the file as 'mod_jk.so' in the Modules folder of the Apache installation directory, for example, <drive>:\Program Files\Apache Group\Apache2\Modules.

    B. Click here to download the 'modjk_workers_Tomcat5517_IMS92.zip' file.

    C. Extract the files from the zip file.
    - Extract the mod_jk.conf file to the <Tomcat Home>\conf directory, for example, <Drive>:\Program Files\Apache Software Foundation\Tomcat 5.5\conf.
    - Extract the workers.properties file to the <Apache Home>\conf directory, for example, <drive>:\Program Files, Apache Group\Apache2\conf.

    D. Edit the 'workers.properties' file with the Notepad text editor.
    Warning:   
    Notepad must be used to edit the workers.properties file. Using other text editors for this step may cause a '404 Error, File not found' later in the installation.
    - Set worker.tomcat_home to the same value %CATALINA_HOME% was set to.
    - Set worker.java_home to the same value %JAVA_HOME% was set to.
    - Set worker.ajp13.host to your server's fully qualified domain name.

    Save and close the file.

    The edited workers.properties file should be similar to the example below:
    #Begin worker.properties*****
    
    	#
    
    	worker.ajp13.type=ajp13
    
    	#
    
    	#Specifies the load balance factor when used with a load balancing worker.
    
    	#Note:
    
    	#-----> lbfactor must be > 0
    
    	#-----> Low lbfactor means less work done by the worker.
    
    	#
    
    	worker.ajp13.lbfactor=1
    
    	#
    
    	#Specify the size of the open connection cache.
    
    	#worker.ajp13.cachesize
    
    	#
    
    	#------DEFAULT LOAD BALANCER WORKER DEFINITION-----------
    
    	#
    
    	#The loadbalancer (type lb) worker perform weighted round-robin
    
    	#load balancing with sticky sessions.
    
    	#Note:
    
    	#---> If a worker dies, the load balancer will check its state once
    
    	#in a while. Until then all work is redirected to peer worker.
    
    	#
    
    	worker.loadbalancer.type=lb
    
    	worker.loadbalancer.balanced_workers=ajp13
    
    	#
    
    	#worker.tomcat_home should point to the location where you installed
    
    	#tomcat. This is where you have your conf, webapps and lib directories.
    
    	#Note: Please make sure to enter the appropriate path from your machine.
    
    	#
    
    	worker.tomcat_home="C:\Program Files\Apache Software Foundation\Tomcat 5.5\"
    
    	#
    
    	#worker.java_home should point to your Java installation.
    
    	#Normally you should have a bin and lib directories beneath it.
    
    	#Note: Please make sure to enter the appropriate path from your machine.
    
    	#
    
    	worker.java_home="C:\Program Files\Java\jdk1.5.0_013\"
    
    	#
    
    	#You should configure your environment slash...ps=\on NT and / on UNIX
    
    	#and may be different elsewhere.
    
    	#
    
    	ps=\
    
    	#-------ADVANCED MODE-------
    
    	#------------------------------
    
    	#
    
    	#
    
    	#-------DEFAULT worker list------
    
    	#----------------------------------
    
    	#
    
    	#The worker that your plugins should create and work with
    
    	#
    
    	worker.list=ajp13
    
    	#
    
    	#----DEFAULT ajp13 WORKER DEFINITION-----
    
    	#
    
    	#Defining a worker named ajp13 and of type ajp13
    
    	#Note that the name and the type do not have to match.
    
    	#
    
    	worker.ajp13.port=8009
    
    	worker.ajp13.host=www.mywebsite.com or mymachinename
    
    	worker.ajp13.cachesize=10
    
    	worker.ajp13.cache_timeout=600
    
    	worker.ajp13.socket_keepalive=1
    
    	worker.ajp13.recycle_timeout=300
    
    	#
    
    	#*****End worker.properties*****
    
    
    E. Edit the 'mod_jk.conf' file with the Notepad text editor.
    - Set JkWorkersFile to its location in the <Apache Home>\conf directory.
    - Set JkLogFile to its location in the <Tomcat Home>\logs directory.
    - Set ServerName to the server's fully qualified domain name.

    Save and close the file.

    The contents of the 'mod_jk.conf' file should appear similar to the example below:
    JkWorkersFile "C:\Program Files\Apache Group\Apache2\Conf\workers.properties"
    	JkLogFile "C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs\mod_jk.log"
    	
    	JkLogLevel all
    	
    	<VirtualHost * >
    	ServerName mymachinename
    	
    	JkMount /servlet ajp13
    	JkMount /servlet/* ajp13
    	
    	JkMount /esriadmin ajp13
    	JkMount /esriadmin/* ajp13
    	
    	JkMount /examples ajp13
    	JkMount /examples/* ajp13
    	
    	JkMount /webdav ajp13
    	JkMount /webdav/* ajp13
    	
    	JkMount /tomcat-docs ajp13
    	JkMount /tomcat-docs/* ajp13
    	
    	JkMount /manager ajp13
    	JkMount /manager/* ajp13
    	
    	JkMount /servlets-examples ajp13
    	JkMount /servlets-examples/* ajp13
    	
    	</VirtualHost>
    
    F. Link the Apache Web Server to Tomcat through the 'mod_jk.conf' file.
    - Edit the 'httpd.conf' file by clicking Start > Programs > Apache HTTP Server 2.0.58 > Server > Edit the Apache httpd.conf Configuration File.
    - Find the line below:
    #LoadModule ssl_module modules/mod_ssl.so
    
    - Add the following line just below:
    LoadModule jk_module modules/mod_jk.so
    
    - Scroll to the end of the httpd.conf file and add the following line to the end of the file:
    Include "C:/Program Files/Apache Software Foundation/Tomcat 5.5/conf/mod_jk.conf"
    
    Warning:   
    The path must be enclosed in double quotes ("") if the default location was used with spaces in the directory name. The slashes must be reversed in all cases.
    - Save and close the httpd.conf file.
    Note: 
    Beginning with Tomcat 4.0, the mod_webapp module was developed for efficient communication between Apache and Tomcat. However, it is known to not work reliably on any Windows platform; therefore, the mod_jk module designed specifically for this version of Tomcat is used above.
    G. Restart the services.
    - Open the Windows Services panel.
    - Stop and then start the services in the following order:
    1. Stop Apache Web Server.
    2. Stop Tomcat Servlet Engine.
    3. Start Tomcat Servlet Engine.
    4. Start Apache Web Server.
    Warning:   
    If a Windows error appears, check the spelling and location of directory paths and the orientation of slashes within any code that was added to the 'httpd.conf' or 'mod_jk.conf' or 'workers.properties' files.
    After corrections have been made, start and stop the services in the above order.
  6. Verify that Apache Web Server and Tomcat Servlet Engine were installed successfully.
    Test the connectivity between the Apache and Tomcat.
    Warning:   
    If this test fails, first check the URL carefully for case or spelling issues, then retrace the installation steps. Do not proceed to install ArcIMS.
    Warning:   
    It may be that the URL works if 'http://localhost:8080/...' is specified. This indicates that while the Tomcat Web Server is working on port 8080, the required redirect from the Apache Web Server is failing. Retrace the installation steps. Do not proceed to install ArcIMS.
    1. Restart Services.
      1. Open the Services window.
      2. Start and stop the services in the following order:
        1. Stop Apache2
        2. Stop Apache Tomcat
        3. Start Apache Tomcat
        4. Start Apache2.
    2. Enter the following into a Web browser A page should display that says 'Hello World' if the test is successful.
      Note: This is case sensitive.
      http://<mymachinename>/examples/servlets/servlet/HelloWorldExample
  7. Install ArcIMS 9.2 or 9.3 from the installation DVD.
    1. Perform the ArcIMS Post Installation -- see Step 4 in the ArcIMS Installation Guide -- to configure ArcIMS with Apache and Tomcat.
    2. Select Typical as the Post Installation Option.
    3. Accept the default directories and options.
    4. When the Web Server-Servlet Engine Configuration is reached, select Apache 2.0.5x with Tomcat 5.x. Click Next.
    5. For Web Server directory, enter the path where Apache 2.0.58 is installed, for example, <Drive>:\Program Files\Apache Group\Apache2.
    6. For Servlet Engine directory, enter the path where Tomcat 5.5.17 is installed, for example, <Drive>:\Program Files\Apache Software Foundation\Tomcat 5.5.
    7. If asked, permit the Post Installation to restart the ArcIMS services.
    8. Restart the Web Server and Servlet Engine from the Windows Services panel, once the Post Installation has finished.
    9. Verify that the ArcIMS installation was successful.
  8. For ArcIMS 9.2:
    1. Navigate to Start > Programs > ArcGIS > ArcIMS > ArcIMS Diagnostics.
    2. Verify that the Web server protocol and Web server name are correct, including the domain and port number. The default is port 8
    Note: 
    On Windows XP/2003 machines, Internet Explorer sometimes does not show the host name and port number. If this is the case, right-click near the top of the window, under the address bar, and select 'Allow Blocked Content'.
    1. Test both components.
    The result for Test 1 should be:

    IMS v9.2.0
    Build_Number=514.1916
    Version=9.2.0
    Test successful

    The result for Test 2 should be:

    Version=9.2.0
    Build_Number=514.2159
    Test successful
    Note: 
    If these tests are successful, the ArcIMS Application Server and ArcIMS Servlet Connector are configured correctly. If an error message is received, select the error number from the drop-down list and click View. The error number and a description displays. Follow the instructions in the description to fix the problem and run the Diagnostics tool again.
    For ArcIMS 9.3:
    1. Navigate to Start > Programs > ArcGIS > ArcIMS > ArcIMS Diagnostics.
    2. Verify that the Web server protocol and the Web server name are correct, including the domain and port number. The default is port 80.
    Note: 
    On Windows XP/2003 machines, Internet Explorer sometimes does not show the host name and port number. If this is the case, right-click near the top of the window, under the address bar, and select 'Allow Blocked Content'.
    1. Test both components.
    The result for Test 1 should be:

    IMS v9.3.0
    Build_Number=503.1916
    Version=9.3.0
    Test successful

    The result for Test 2 should be:

    Version=9.3.0
    Build_Number=503.2159
    Test successful
    Note: 
    If these tests are successful, the ArcIMS Application Server and ArcIMS Servlet Connector are configured correctly. If an error message is received, select the error number from the drop-down list and click View. The error number and a description displays. Follow the instructions in the description to fix the problem and run the Diagnostics tool again.
    For additional steps for configuring ArcIMS, refer to the ArcIMS Installation Guide, Step 5.

    For setting up the ArcIMS Web ADF for the Java Platform or for the Microsoft .NET Framework, please reference the appropriate Installation Guide.

Related Information