English

How To: Install Apache 2.0.xx with Tomcat 5.0.xx and J2SDK 1.4.2_06 for ArcIMS 9.1 on Solaris/Linux/AIX/HP-UX

Summary

Instructions provided are for the installation and configuration of Apache 2.0.xx with Tomcat 5.0.xx using J2SDK 1.4.2_06 for ArcIMS on Solaris/Linux.

Specific installation information is provided in the ArcIMS Install Guide.

This installation requires the following software:

Note:
HP-UX has a package available for download that includes Tomcat, Apache, and the mod_jk connector. If using the HP-UX Web Server Suite then only the "Configure Apache and Tomcat" step is necessary. See the link in the Related Information section.
 

Before Beginning

Consider the following during the installation:
  1. The compression package that is used must be installed. Both 'tar' and 'uncompress' are usually included with the operating system.
  2. Some browsers automatically uncompress files as they are downloaded. If problems are encountered while uncompressing a file, compare the size of the downloaded file to the original size of the file on the host site. If they are substantially different, the downloaded file was probably uncompressed.
  3. Perl is usually installed with the operating system; see the 'perl' executable under /usr/bin. Check the version of perl installed and referenced on the system by typing 'perl -version'.
  4. In most cases, the GNU GCC compiler is installed. Check the version of the GCC compiler installed by typing 'gcc -v' at the command prompt.
    Note:
    Verify that GCC Compiler version 2.95.3 or higher is present on the system.
    
  5. Make compiler is also installed with the operating system; see the 'make' executable under /usr/bin. Make is a tool that controls the generation of executables and other non-source files of a program from the program's source files.
    Note:
    Root privileges are required to install Perl, GNU GCC, and Make compiler packages.
    
  6. Verify the path to the 'perl' compiler, the 'gcc' compiler, and the 'make' compiler are in the PATH variable. That is, 'set PATH = (/usr/bin /usr/local/bin $PATH)', located in .cshrc, .bashrc, or .profile.

Procedure

  1. Download and install Java 2 SDK, Standard Edition version 1.4.2_06.
    Install Java for Solaris/Linux:
    1. Click Download for the J2SDK 1.4.2_06 on the SUN Java Download site.
    2. Select the 32-bit 'self-extracting' file.
    3. Install the Java 2 SDK. The installation instructions are available for download on the same Web site.
    4. Record the installed location for use, when setting the JAVA_HOME environment variable later.
    Install Java for AIX:
    1. Download the 'SDK base image and JRE' for 'Java 1.4.2 32-bit' from IBM's Java Download site.
    2. Follow the directions available for downloading from the same site for installing the 'SDK Java 1.4.2 32-bit base image' and 'JRE' to '/usr/java14'.
    3. Record this location for use when setting the JAVA_HOME environment variable later.
    Install Java for HP-UX:
    1. Download 'SDK version 1.4.2.06 PA-RISC' from HP's java download site.
    2. Follow the instructions available on the same site for installing the 'SDK version 1.4.2.06' to '/opt/java1.4'.
    3. Record the installed location for use when setting the JAVA_HOME environment variable later.
  2. Download and install Apache version 2.0.xx.
    Note:
    In the steps below, it is assumed that Apache 2.0.48 is used. If a different version was downloaded, replace the file name where mentioned.
    
    Warning:   
    Root permissions are assumed when following this document. The default HTTP port of 80 requires root privileges, and the Apache install location of /usr/local/apache also requires root privileges. If the 'root' account is not being used, then certain steps fail.
    
    1. Click 'httpd-2.0.48.tar.gz' to download the Apache Web Server version 2.0.48.
      This file contains a compressed archive of Apache Web server source code.
    2. Uncompress this file in a temporary location, that is, $TEMP, by typing:
      gunzip httpd-2.0.48.tar.gz
      
    3. An archive file is created named 'httpd-2.0.48.tar.' To untar this archive, type:
      tar -xvf httpd-2.0.48.tar
      
      Note:
      The source code for the Apache Web server should be extracted into a directory named 'httpd-2.0.48' in the $TEMP location.
      
    4. Navigate to the $TEMP/httpd-2.0.48. Decide on a location to install the Apache Web server, for example, /usr/local/apache.
    5. To configure Apache, type:
      ./configure --prefix=/usr/local/apache --enable-module=so
      
    6. Type:
      make
      
    7. Type:
      make install
      
      Note:
      The directory '/usr/local/apache' is now created.
      
    8. Set the environment variable 'APACHE_HOME' to the new installation location for Apache. For example, '/usr/local/apache' was used in this article. If using bash, ksh, or sh type:
      export APACHE_HOME=/usr/local/apache
      
      If using csh, we would type:
      setenv APACHE_HOME /usr/local/apache
      
      This setting may then be checked by typing:
      echo $APACHE_HOME
      
      Warning:   
      It is highly recommended that this environment variable be added to root's initialization file: .cshrc, .bashrc, or .profile. The steps necesssary depend on the OS and shell settings being used. The initialization file needs to be sourced after the edits, for them to take effect. If this is not done, the APACHE_HOME variable must be set manually before starting and stopping Apache.
    9. Setup a default Web page for Apache, by copying the '$APACHE_HOME/htdocs/index.html.en' file to '$APACHE_HOME/htdocs/index.html'. Type:
      cd $APACHE_HOME/htdocs
      cp index.html.en index.html
      
    10. Open the '$APACHE_HOME/conf/httpd.conf' file in a text editor and change the values for ServerName and Listen (Port) to reflect the system environment. For example, a system with a DNS name of 'gis.esri.com' using the default port of '80' would have:
      ServerName gis.esri.com
      Listen 80
      
      Note:
      Root privileges are required to use a port below 1024. The # symbol must be removed from the beginning of a line in the 'httpd.conf' file for the contents of the line to be recognized.
      
    11. Start Apache by navigating to $APACHE_HOME/bin and typing:
      cd $APACHE_HOME/bin
      ./apachectl start
      
    12. Open a browser and load the Web site root: http://<Servername>:<ServerPort>.Include the port number if the default port of '80' is not being used. The default page should be displayed. The default page for an Apache Web site contains the phrase "It Worked! The Apache Web Server is Installed on this Web Site!" along with some additional text. Use the previous example, open a browser and type:
      http://gis.esri.com
      
      If the default page appears, continue to step M.

      If the page is not displayed, check the following:
      1. To make sure the Apache daemons are running, type
        ps -ef | grep -i apache
        
      2. If the port number is not the default (80), make sure it is appended on the Web server URL (for example, http://www.website.com:2004 - where '2004' is the Web server port).
      3. Make sure the Web server port is not already being used.
        netstat –an | grep <ServerPort>
        
      4. Make sure the ServerName variable is correct; also, try commenting out the ServerName variable by placing a # in front of it.
        #ServerName gis.esri.com
        
      5. Check the Apache Web server log files for additional information that are located in $APACHE_HOME/logs.
    13. Once Apache is confirmed to be working, stop Apache by navigating to $APACHE_HOME/bin and typing:
      cd $APACHE_HOME/bin
      ./apachectl stop
      
  3. Download and install Jakarta-Tomcat 5.0.xx.
    Note:
    In the steps below it is assumed that Tomcat 5.0.25 is used. If a different version was downloaded, please replace the file name where mentioned.
    
    1. Click the following link to download the file jakarta-tomcat 5.0.25.tar.gz. This file contains a compressed archive of Jakarta-Tomcat binary code.
    2. Decide on a location to install the Tomcat Servlet Engine. For example /usr/local/jakarta-tomcat-5.0.25.
    3. Uncompress the file by typing:
      gunzip jakarta-tomcat-5.0.25.tar.gz
      
    4. The file 'jakarta-tomcat-5.0.25.tar' will be created. Untar this archive by typing:
      tar -xvf jakarta-tomcat-5.0.25.tar
      
      Note:
      The directory structure and files associated with the binary version of Tomcat will be created in the 'jakarta-tomcat-5.0.25' directory. See notes mentioned in the Before Beginning section if problems occur.
      
    5. Move the directory to the location decided on in step B, for example '/usr/local/tomcat5.0.25'.
      mv jakarta-tomcat-5.0.25 /usr/local/jakarta-tomcat5.0.25
      
    6. Open the .cshrc, .bashrc, or .profile file (whichever file is used to set environment variables for the current user session) and add two variables: JAVA_HOME and CATALINA_HOME.
    7. Set JAVA_HOME to the location of the JDK installed in Step 1. This example used, /usr/local/java/j2sdk1.4.2.
    8. Set CATALINA_HOME to the location of the Tomcat binary installation. This example used, /usr/local/jakarta-tomcat5.0.25.
    9. Re-source your .cshrc, .bashrc, or .profile file after saving the changes.
    10. To start Tomcat, navigate to $CATALINA_HOME/bin and run the startup.sh script.
      cd $CATALINA_HOME/bin
      ./startup.sh
      
    11. Open the homepage for the Tomcat server in a browser. The URL will be http://<server_name>:8080. The Tomcat default homepage should launch.
    12. Once Tomcat is confirmed to be working, stop Tomcat by navigating to $CATALINA_HOME/bin and run the shutdown.sh script.
      cd $CATALINA_HOME/bin
      ./shutdown.sh
      
  4. Configure Apache version 2.0.xx and Jakarta-Tomcat version 5.0.xx.
    Note:
    To use Apache with Tomcat, a 'mod_jk2.so' tomcat connector is needed to enable communication between the two. This connector library can be downloaded from the Web.
    
    1. Click the following link to download the appropriate copy of Tomcat Connectors.
      Note:
      To create the mod_jk2 connector for AIX and HP-UX, please download the source files from here.
    2. Rename the file to 'mod_jk.so'. Type:
      mv mod_jk2-2.0.43.so mod_jk2.so
      

      The 'mod_jk.so' file is now created.
    3. Copy the mod_jk2.so file to the '$APACHE_HOME/modules' directory and make it executable.
      cp mod_jk2.so $APACHE_HOME/modules
      cd $APACHE_HOME/modules
      chmod 755 mod_jk2.so
      
    4. Copy the workers2.properties file in the '$APACHE_HOME/conf' directory.
    5. Add the following code to the bottom of the workers2.properties file:
      [uri:/servlets-examples/]
      info=Prefix mapping
      
      [uri:/servlets-examples/*]
      info=Prefix mapping
      
    6. Navigate to $APACHE_HOME/conf and open httpd.conf with a text editor.
    7. Add the following line to the bottom of the LoadModule Section:
      LoadModule jk2_module modules/mod_jk2.so
      
    8. Save and close the file.
    9. Navigate to $APACHE_HOME/bin and start the Apache web server:
      cd $APACHE_HOME/bin
      ./apachectl start
      
    10. Navigate to $CATALINA_HOME/bin and start the Tomcat servlet engine:
      cd $CATALINA_HOME/bin
      ./startup.sh
      
    11. Open a Web browser and navigate to the following URL: http://<server_name>/servlets-examples. Choose the 'servlet/' link. Execute the Hello World example. If a response containing Hello World! is returned, then Apache and Tomcat are communicating as expected.
  5. Install ArcIMS 9.1 from the installation CD. Refer to the ArcIMS 9.1 Installation Guide, Step 3a.
  6. To configure ArcIMS 9.1, run the ArcIMS Post Installation. Refer to the ArcIMS 9.1 Installation Guide, Step 3b.
    Note:
    At the end of the Post Installation, running the ArcIMS Web Server Configuration is required. This script must be run as 'root'. To manually configure Apache 2.0.xx with Tomcat 5.0.xx for ArcIMS, refer to the ArcIMS Installation Guide Step 4: Configure your Web server.
  7. For the final steps to get ArcIMS running, see the ArcIMS Installation Guide, "Step 5: Configuring ArcIMS".

Related Information