How To: Install Apache 2.0.48 with Tomcat 4.1.30 and J2SDK 1.4.2_06 for ArcIMS 9.1 on Solaris/Linux/AIX/HP-UX
Instructions provided describe the installation and configuration of Apache 2.0.48 with Tomcat 4.1.XX using J2SDK 1.4.2_06 for ArcIMS on Solaris/Linux/AIX/HP-UX.
Specific installation information for ArcIMS is provided in the ArcIMS Install Guide.
This installation requires the following software:
· Java 2 SDK, Standard Edition, version 1.4.2_06
· Apache Web Server 2.0.48
· Jakarta-Tomcat Servlet Engine version 4.1.XX
· ArcIMS Installation CD
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.
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.
- The installation of Java is slightly different for each operating system (OS).
Install Java for Solaris or Linux:A. Click Download for the J2SDK 1.4.2_06 on the SUN Java Download site.
B. Select the 32-bit 'self-extracting' file.
C. Install the Java 2 SDK. The installation instructions are available for download on the same Web site.
D. Record the installed location for use, when setting the JAVA_HOME environment variable later.
Install Java for AIX:A. Download the 'SDK base image and JRE' for 'Java 1.4.2 32-bit' from IBM's Java Download site.
B. 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'.
C. Record this location for use when setting the JAVA_HOME environment variable later.
Install Java for HP-UX:A. Download 'SDK version 1.4.2.06 PA-RISC' from HP's java download site.
B. Follow the instructions available on the same site for installing the 'SDK version 1.4.2.06' to '/opt/java1.4'.
C. Record the installed location for use when setting the JAVA_HOME environment variable later.
- Download and install Apache version 2.0.48:
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.A. 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.
B. Uncompress this file in a temporary location, that is, $TEMP, by typing:
gunzip httpd-2.0.48.tar.gzC. 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.D. Navigate to the $TEMP/httpd-2.0.48. Decide on a location to install the Apache Web server, for example, /usr/local/apache.
E. To configure Apache, type:
./configure --prefix=/usr/local/apache --enable-module=soF. Type:
Note: The directory '/usr/local/apache' is now created.H. 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/apacheIf using csh, we would type:
setenv APACHE_HOME /usr/local/apacheThis setting may then be checked by typing:
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.I. 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.htmlJ. 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.K. Start Apache by navigating to $APACHE_HOME/bin and typing:
cd $APACHE_HOME/bin ./apachectl startL. 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.comIf 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 apache2. 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.com5. Check the Apache Web server log files for additional information that are located in $APACHE_HOME/logs.
M. Once Apache is confirmed to be working, stop Apache by navigating to $APACHE_HOME/bin and typing:
cd $APACHE_HOME/bin ./apachectl stop
- Install Tomcat 4.1.30:
A. Click the following link to download the file jakarta-tomcat-4.1.30.tar.gz
Note: In the steps below, it is assumed that the 'jakarta-tomcat-4.1.30.tar.gz' file is downloaded. If a different file is downloaded, replace the file name in the examples below.B. Decide on a location to install the Tomcat Servlet Engine. For this example use, /usr/local/tomcat4.1.30.
C. Uncompress the file by typing:
gunzip jakarta-tomcat-4.1.30.tar.gzD. The file 'jakarta-tomcat-4.1.30.tar' is created. Untar this archive by typing:
tar -xvf jakarta-tomcat-4.1.30.tar
Note: The directory structure and files associated with the binary version of Tomcat are created in the 'jakarta-tomcat-4.1.30' directory. See notes mentioned in the Before Beginning section if problems occur.E. Move the directory to the location decided on earlier in step B. This example used '/usr/local/tomcat4.1.30'.
mv tomcat-4.1.30 /usr/local/tomcat4.1.30F. 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.
G. Set JAVA_HOME to the location of the JDK installed in step 1. This example used, /usr/local/java/j2sdk1.4.2.
H. Set CATALINA_HOME to the location of the Tomcat binary installation. This example used, /usr/local/tomcat4.1.30.
I. Re-source your .cshrc, .bashrc, or .profile file after saving the changes.
J. To start Tomcat, navigate to $CATALINA_HOME/bin and run the startup.sh script.
cd $CATALINA_HOME/bin ./startup.shK. Open the homepage for the Tomcat server in a browser. The URL is http://<server_name>:8080. The Tomcat default homepage should be visible.
L. 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
- Configure Apache/Tomcat:
Note: To use Apache with Tomcat, a 'mod_jk2.so' Tomcat connector is needed to enable communication between the two. This connector library may be downloaded from the Web. Links have been provided to the pre-compiled binary file and also to the source code.A. Click the following link to download the appropriate copy of Tomcat Connectors.
Download the connector for Solaris.
Download the connector for Linux.
Download the source code for HP-UX and AIX.
Note: HP-UX and AIX users need to follow the instructions found on the Apache Web site for compiling the mod_jk2 connector.
Note: Linux and Solaris users need to follow the instructions below after extracting the downloaded files.B. Rename the file to 'mod_jk2.so' if it is not already named that.
mv mod_jk2-2.0.43.so mod_jk2.soC. 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.soD. Copy the 'workers2.properties' file in the '$APACHE_HOME/conf' directory.
E. Navigate to '$APACHE_HOME/conf' and open 'httpd.conf' with a text editor.
F. Add the following line to the bottom of the LoadModule Section:
LoadModule jk2_module modules/mod_jk2.soH. Save and close the file.
G. Navigate to '$APACHE_HOME/bin' and start the Apache Web server:
cd $APACHE_HOME/bin ./apachectl startH. Navigate to '$CATALINA_HOME/bin' and start the Tomcat servlet engine:
cd $CATALINA_HOME/bin ./startup.shI. Open a Web browser and navigate to the following URL:
http://<server_name>/examples/servlet/HelloWorldExampleIf a response containing "Hello World!" is returned, Apache and Tomcat are communicating as expected.
- Install ArcIMS 9.1 from the installation CD. Refer to the ArcIMS 9.1 Installation Guide, step 3a.
- 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, it is required to run the ArcIMS Web Server Configuration. This script must be run as 'root'. If Apache 2.0.xx with Tomcat 5.0.xx for ArcIMS is being configured manually, please refer to the ArcIMS Installation Guide step 4: Configure your Web server.
- For the final steps to get ArcIMS running, refer to the ArcIMS Installation Guide, "Step 5: Configuring ArcIMS".