Installing Project.net in a Production Environment Using Tomcat Application Server

  1. Installing Project.net in a Production Environment Using Tomcat …
  2. Step 1: Review checklist of requirements
  3. Step 2: Unpack the Project.net Installation Package
  4. Step 3: Install and configure the Oracle database server
    1. Prerequisites
    2. Instructions
  5. Step 4: Create and configure the Project.net database
    1. Prerequisites
    2. Instructions
  6. Step 5: Install and Update Java Runtime Environment
    1. 5.1: Install the Java 5.0 Runtime Environment
      1. Prerequisites
      2. Instructions (Windows installations)
    2. 5.2: Update the Java Security for Strong Encryption
      1. Prerequisites
      2. Instructions
  7. Step 6: Install and Configure the Apache Tomcat Server
    1. 6.1: Install the Tomcat Application Server
      1. Prerequisites
      2. 6.1.1 Instructions (Windows installations)
      3. 6.1.2 Instructions (Linux installations)
    2. 6.2: Configure Tomcat application server
      1. Prerequisites
      2. Instructions
    3. 6.3 Patch pre-5.5.25 Tomcat with mail session classes
      1. Instructions
    4. 6.4 Setting Java parameters
      1. Instructions (Linux systems)
    5. 6.5 Configure Tomcat logging
      1. Prerequisites
      2. Instructions
    6. 6.6 Configure Tomcat to automatically start on boot-up
      1. Instructions (Windows installations)
      2. Instructions (Linux installations)
  8. Step 7: Deploy Project.net to Tomcat Server
    1. Prerequisites
    2. Instructions (Manual Deployment)
    3. Instructions (Using Tomcat manager)
  9. Step 8: Update the appadmin user account
    1. Prerequisites
    2. Instructions
  10. Step 9: Configure Project.net System Settings
    1. 9.1 Specify document vault storage
      1. Instructions
    2. 9.2 Customize system settings
      1. Prerequisites
      2. Instructions
    3. 9.3 Create a configuration for your installation
      1. 9.3.1 Modify the default configuration
        1. Instructions
      2. 9.3.2 Create a custom configuration
        1. Instructions
      3. 9.3.3 Site-specific token values
        1. Instructions
  11. Step 10: Install the Master License Properties for your Server
    1. Prerequisites
    2. Instructions
  12. Step 11: Web server front-end integration
    1. Prerequisites
    2. Instructions (Apache installations)
      1. Linux
      2. Windows
    3. Instructions (IIS installations)
      1. Windows Only
  13. Step 12: Improve Tomcat performance in a Linux environment
    1. Prerequisites
    2. Instructions (Linux installations)
  14. Step 13: Finished

This document guides a user through the process of installing Project.net, version 8.3, on a Tomcat application server. In addition to the application server, a Project.net installation will also require: web server, database server, mail (SMTP) server, document vault (file server) and LDAP server (optional).

Step 1: Review checklist of requirements

Please review the complete list of hardware and software requirements as described in Summary of Project.net 8.3 Deployment Requirements. Make sure you can meet these requirements before installing Project.net. You will also need to read Preparing to Install Project.net.


Step 2: Unpack the Project.net Installation Package

The installation package includes the Project.net software in a zip archive file. The first step to installing Project.net is to unpack the software onto an accessible file location.

  1. If it does not exist, create a temporary directory to unpack the installation package, suggested, C:\pnet. These instructions will refer to this location throughout the steps.
  2. Unzip the zip file from your download into the C:\pnet directory. Once unpacked, you will have c:\pnet\v8.3.0-tomcat-commercial directory.

Step 3: Install and configure the Oracle database server

Project.net requires an Oracle database server. Follow the instructions in this section to install and configure an Oracle database server, if one is not prepared.

Prerequisites

  • A copy of Oracle as specified in the Summary of Project.net 8.3 Deployment Requirements.
  • If you are installing on a system with a non-static IP address, served from a DHCP-server, you will need to install a Microsoft Loopback Adapter. Follow How to install the Microsoft Loopback adapter in Windows XP. When complete, open the new adapter’s properties and set its IP address to a non-routing address, like 192.168.x.x (where x is any number between 0 and 255). Also, set its Subnet mask to 255.255.255.0. Make note of this address, you will need it further in the installation.

Instructions

  1. Install Oracle 10.2 Enterprise or Express Edition.

Step 4: Create and configure the Project.net database

This section will guide you through the steps of creating the tables, stored procedures and such for the Project.net database.

Prerequisites

  • An Oracle database server, installed as above.
  • A working copy of sqlplus. Normally, this is installed with the Oracle database, but if not, the Oracle instant client is sufficient.
  • The system password for the Project.net database instance.
  • You will need to know the database server’s hostname.

Instructions

  1. Run the Oracle Database Configuration Assistant located in the Windows Start/Oracle/Configuration and Migration Tools menu to create a database instance for the Project.net application.
    1. Select Create a Database the click Next.
    2. Choose the General Purpose database template.
    3. Note the Global Database Name and SID that you use.
    4. Choose your preferred management method. If unsure, chose the default.
    5. Note the password(s) you use for the various accounts.
    6. Select the appropriate storage mechanism for your installation. Again, if unsure, chose the default.
    7. Specify the storage location.
    8. And Recovery Configuration.
    9. Do not install the Sample Schemas.
    10. Select the remaining options, as appropriate to your installation, and create the database.
  1. Add a listener using Oracle Net Configuration Assistant.
    1. Start / Programs / Oracle-OraHome10g / Configuration and Migration tool / Net configuration assistant
    2. First screen - select Listener Configuration
    3. Second screen - select Add
    4. Third screen - enter listener name
    5. Fourth screen - keep default values (TCP)
    6. Fifth screen - keep default values (1521)
    7. Sixth screen - Select No (don’t configure another listener) and click Next.
    8. Click Next on the Listener configuration complete screen.
    9. Click Finish on the Welcome screen.
  1. CHECKPOINT: Ensure the Oracle Database listener services are running.
    1. Run the command lsnrctl status in a command window and check the values for:
        - ALIAS
        - Listener Parameter File
        - Listening Endpoints Summary
      
    2. Return to the command window and check TNS connect identifier with tnsping <database SID>.
    3. Also, check that sqlplus system/<database admin password>@<database name> connects.
    4. Close the command window.
  1. Change directory into the c:\pnet\v8.3.0-tomcat-commercial\database\create-scripts\admin\ directory.
  1. Using the editor of your choice, edit the pnetMasterDBBuild.bat (or pnetMasterDBBuild.sh) file. Set the environment variables in this script to be appropriate for your installation. Further instructions are available in the file.
  • Note: the PNET_BUILD_DB_SCRIPTS_PATH should be set to c:\pnet\v8.3.0-tomcat-commercial\database directory.
  • The directory specified for PNET_BUILD_DB_LOG_PATH must exist; create it if it does not. Suggested is c:\pnet\logs.
  1. To start the database installation, run the batch command pnetMasterDBBuild.bat (or

pnetMasterDBBuild.sh) from the \database\create-scripts\admin directory. The script will take some time to run; you can monitor its progress by checking the log file you specified inside of pnetMasterDBBuild.

  • When complete, check the log for errors. You will notice some errors in the logs about public synonym already existing, but there should be only about 55 lines in the log file with the word “ERROR”.
  • If the script fails and you need to re-run it, it's best to run the /create-scripts/tools/drop_pnet_and_user_schemas.sql script to clean everything up before trying again.

Step 5: Install and Update Java Runtime Environment

5.1: Install the Java 5.0 Runtime Environment

Prerequisites

Instructions (Windows installations)

5.2: Update the Java Security for Strong Encryption

Prerequisites

Instructions

  1. Copy c:/pnet/v8.3.0-tomcat-commercial/lib/jce/*.jar to the jre/lib/security directory of the Java runtime location. For Windows, the likely location is C:\Program Files\Java\jre1.5.0_14\lib\security.
  • Place the files directly into the security directory, overwriting any existing files that conflict.

Step 6: Install and Configure the Apache Tomcat Server

This section outlines the Apache Tomcat installation and configuration for a production deployment of the Project.net application.

6.1: Install the Tomcat Application Server

Prerequisites

6.1.1 Instructions (Windows installations)

  1. Install Apache Tomcat 5.5.* by running the installer apache-tomcat-5.5.23.exe (Windows service installer)
  2. Select the path that you want to install tomcat5.5 and click Next.
  3. Next Screen (Configuration Options)
  4. HTTP/1.1 Connector Port : 8080
  5. User Name : manager
  6. Password : manager
  7. Select the path of J2SE 5.0 JRE installed on your system (example C:\Program Files\Java\jre1.5.0_14)
  8. Click the Install button. (While installing tomcat 5.5 it may ask the network password, click cancel)
  9. On the last screen uncheck the option for Run Apache Tomcat and click Finish.

6.1.2 Instructions (Linux installations)

  1. If you have already downloaded the binary, simply copy it to the directory you want to install it under and expand the file. For example, if the downloaded Tomcat tar file is in /home/someuser/downloads, to install it under /opt, follow these steps. As root user:
    # cp /home/someuser/downloads/jakarta-tomcat-5.x.xx.tar.gz /opt
    # tar -zxvf jakarta-tomcat-5.x.xx.tar.gz
    
  2. A directory called jakarta-tomcat-5.5.xx will be created and the Tomcat files will expanded under it. You may want to create a symbolic link to a the /opt/tomcat directory for easier upgrades and configuration.
    # ln -s jakarta-tomcat-5.5.25 tomcat
    
  3. In order for Tomcat to startup and shutdown, you will also need to add an environment variable pointing to the Tomcat directory (CATALINA_HOME), and one variable pointing to your Java SDK directory (JAVA_HOME). Insert the following lines inside /etc/profile or /root/.bashrc. Please make sure that you enter your operating system installation paths.
export JAVA_HOME=/opt/jdk151
export CATALINA_HOME=/opt/tomcat
  1. To Start tomcat
    # $CATALINA_HOME/bin/startup.sh
    
  2. If Tomcat does not start and you downloaded the zip file, the cause is probably due to permissions. Ensure that the following files are executable : inside $CATALINA_HOME/bin directory,
    # chmod +x startup.sh
    # chmod +x shutdown.sh
    # chmod +x tomcat.sh
    
  3. To Stop tomcat
    # $CATALINA_HOME/bin/shutdown.sh
    

6.2: Configure Tomcat application server

Prerequisites

  • Apache Tomcat installed as above.
  • A user name and password for the Tomcat Manager.
  • For more information on configuring and administering Apache Tomcat 5.5, see the following documentation:Tomcat Setup

Instructions

  1. Activate Tomcat Manager
  • Sample "tomcat-users.xml" file with a new user named "manager" and "manager" role associated with it:
      <?xml version='1.0' encoding='utf-8'?>
      <tomcat-users>
      <role rolename="tomcat"/>
      <role rolename="role1"/>
      <role rolename="manager"/>
      <user username="tomcat" password="tomcat" roles="tomcat"/>
      <user username="both" password="tomcat" roles="tomcat,role1"/>
      <user username="role1" password="tomcat" roles="role1"/>
      <user username="manager" password="manager" roles="manager"/>
      </tomcat-users>
    
  1. If you want to deploy application as ROOT, delete the existing CATALINA_HOME/webapps/ROOT folder since the Project.net application will be associated with the / URL and will be installed in this folder. Otherwise no need to follow this instruction.
  2. Copy c:/pnet/v8.3.0-tomcat-commercial/lib/jdbc/ojdbc14.jar to CATALINA_HOME/common/lib.
  3. Create the CATALINA_HOME/common/endorsed folder and copy serializer.jar, xalan.jar, xercesImpl.jar and xml-apis.jar from c:/pnet/v8.3.0-tomcat-commercial/lib/endorsed/svn-root/trunk/core/lib/endorsed/.

6.3 Patch pre-5.5.25 Tomcat with mail session classes

Versions of Tomcat before 5.5.25 have a known bug that they are missing the mail session classes. For Project.net to send email Tomcat versions older than 5.5.25 need to be patched.

Instructions

  1. Download the Tomcat patch file attached to these instructions.
  2. Place a copy into TOMCAT_HOME/common/lib/ directory.

6.4 Setting Java parameters

In order to ensure reliable service the Java virtual machine (JVM) will need to have its parameters tuned.

  • The Xmx parameter controls the maximum heap size the JVM can address.
    • For a development or test server -Xmx512m (512 MB) will be OK.
    • For a production server, the value should be at least -Xmx1024m (1024 MB), but not more than 3/4 the amount of RAM installed in the system.
    • On a 32-bit operating system it cannot exceed -Xmx2048m (2 GB)
  • The Xss parameter controls the stack size for the JVM.
    • Use -Xss128k for a 32-bit operating system.
    • Use -Xss256k if the system has a 64-bit JVM, like HP-UX or IBM-AIX.

Instructions (Linux systems)

Either:

  1. Set the the following system environment variable:
      JAVA_OPTS="-Xms256m -Xmx<see above>m -XX:MaxPermSize=384m -Xss<see above>k -Djava.awt.headless=true"
    
  2. Or add the following lines near the top of TOMCAT_HOME/bin/catalina.sh
      if [ -z "$JAVA_OPTS" ]
      then
        JAVA_OPTS="-Xms256m -Xmx<see above>m -XX:MaxPermSize=384m -Xss<see above>k -Djava.awt.headless=true"
      else
        JAVA_OPTS=${JAVA_OPTS}" -Xms256m -Xmx<see above>m -XX:MaxPermSize=384m -Xss<see above>k -Djava.awt.headless=true"
      fi
    

6.5 Configure Tomcat logging

Prerequisites

Instructions

  1. Follow the four steps for configuring Logging in Tomcat http://tomcat.apache.org/tomcat-5.5-doc/logging.html.

6.6 Configure Tomcat to automatically start on boot-up

The production configuration strategy is to have the Tomcat server run as a Windows service, while the Project.net application is managed and restarted by Tomcat. This will allow Project.net to automatically start when the host system boots up and automatically restart if it ever fails.

Instructions (Windows installations)

  1. Apache Tomcat is automatically configured as a Windows service when Tomcat is installed.

You should create windows service by running

service.bat install

and set service auto start with Services control panel

Instructions (Linux installations)

  1. Create script /etc/init.d/tomcat with
    #! /bin/sh
    
    export JAVA_HOME=/usr/java/jdk1.5.0_05
    export TOMCAT_HOME=path_to_tomcat
    
    export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    DAEMONSTART=$TOMCAT_HOME/bin/startup.sh
    DAEMONSTOP=$TOMCAT_HOME/bin/shutdown.sh
    set -e
    
    case "$1" in
      start)
    	echo -n "Starting Tomcat... "
    	$DAEMONSTART
    	;;
    esac
    
    exit 0
    
  • create links to this file for all runlevels

Debian users may run

update-rc.d tomcat start 91 2 3 4 5  . stop 20 0 1 6 .

Step 7: Deploy Project.net to Tomcat Server

Prerequisites

  • Apache Tomcat installed as above.
  • Administrator's (manager) password for Tomcat installation.
  • Edit CATALINA_HOME/config/context.xml to configure the database connection pool and the connection to the SMTP mail server.
            <Context debug="5" reloadable="true" crossContext="true">
            <Resource name="jdbc/PnetDB" auth="Container"
               type="javax.sql.DataSource" username="pnet_user" password="<pnet_user password>"
               driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@<dns of db listener>:<listener port>:<db SID>"
               maxActive="125" maxIdle="25"/>
            <Resource name="mail/PnetSession" auth="Container"
                      type="javax.mail.Session"
          	    mail.smtp.host="<SMTP host>"/>
            </Context>
    
  • Start Tomcat
    • Linux - CATALINA_HOME/bin/startup.sh
    • Windows - use Service Manager to start the Tomcat service

Instructions (Manual Deployment)

  1. Copy c:/pnet/v8.3.0-tomcat-commercial/app/ROOT.war to CATALINA HOME\webapps directory. If you want to deploy application as NON-ROOT context you can rename war file as <Your desired application name>.war.
  2. Log into http://localhost:8080/<Your desired application name>/ OR http://localhost:8080/ ( if application is deployed as ROOT.war ) as appadmin.

Instructions (Using Tomcat manager)

  1. Log into http://localhost:8080/manager/html/, use default Username 'manager' and password 'manager'.
  2. Browse WAR file to upload. If you want to deploy application as NON-ROOT context you can rename war file as <Your desired application name>.war.
  3. Log into http://localhost:8080/<Your desired application name>/ OR http://localhost:8080/ ( if application is deployed as ROOT.war ) as appadmin.

Step 8: Update the appadmin user account

There is one application administrator account pre-defined for a Project.net installation, appadmin. For security reasons you should change some of the default settings for the appadmin account, such as password and email address, as described below. Giving Application Administration capabilities to a user account contains guidelines for using this account and tells how to create other administrator accounts.

Prerequisites

  • You will need the following information for the built-in administrator's account
Name Description Default
email addressEmail address for the appadmin account. Used to recover the appadmin's passwordadmin@project.net
Password A secure password for the appadmin accountappadmin
Jog question/answerA question you will be asked if you forget your password and its answer

Instructions

  1. Log into the Project.net server, http://localhost:8080, as appadmin user (default password: appadmin).
  2. From the Personal Workspace select Setup from the left-hand menu.
  3. Click Personal Profile.
  4. In the Name sub-tab enter the Primary Email Address:
  5. In the Login sub-tab
    1. Enter appadmin as the current user account and password.
    2. Check-mark Change Password and enter a new secure password.
    3. Check-mark Change Jog Question or Answer and enter a question and answer you will easily remember. If you need to recover the appadmin's password this question will be used to validate you.
  6. Click Submit


Step 9: Configure Project.net System Settings

Now that the server is up and running, you will need to configure some settings within Project.net. These are set through the Application Administration interface.

9.1 Specify document vault storage

Instructions

  1. If not already logged into the Project.net server, log into http://localhost:20000, if application is deployed as a ROOT otherwise log into http://localhost:20000/<Your desired application name>/, as appadmin user.
  2. From the Personal Workspace, click "Application Space" on the lower left to enter the Application Administration interface.
  3. Select Manage / Doc Vault.
  4. Enter a directory path for each of the three "Path to Repository Root" such as:
    c:\pnet-doc-vault\one
    c:\pnet-doc-vault\two
    c:\pnet-doc-vault\three
    
  5. Click [Update].

9.2 Customize system settings

Prerequisites

  • You should be logged into the Application Administration as above
  • Note, if document upload or Microsoft Project import is failing, check the settings in this section.

Instructions

  1. Select Manage / Sys Settings
  2. Change the following variables:
  • Variable: siteHost
    • New Value: The external name of the Project.net website.
    • Description: This variable defines the hostname and port number that Project.net uses when it constructs URLs containing the hostname and port of the web site. Typically used in email notifications, this variable should be set to the fully qualified name of your Project.net server.
    • Example values: myserver.com, myserver.com:7001
  • Variable: supportEmail
    • New Value: Email address of support team.
    • Description: Specifies the email address listed in the Help pages for support queries. It is also used if a user submits an automated error report within the application.
    • Example value: support@project.net
  • Variables: postDataTempDir and xmlImportTempDirectory
    • New Value: File path to directory for tempoary file storage
    • Description: : This value is used as a temporary storage when uploading files. Make sure that the Tomcat user has access to write in the specified directory.
    • Example value: C:\temp or /opt/pnet/tmp

9.3 Create a configuration for your installation

Project.net contains many of its settings in configuration tokens; these tokens are stored in named configuration sets. For example, if you want your company's name and logo to appear on the Project.net login page, you would change the values of two specific tokens.

While you can alter the Project.net default configuration set, it is recommended that you create a configuration just for your installation. Project.net will first use the values from your configuration. Any values not set in your configuration will receive their values from the system default configuration. Using a separate configuration isolates your custom settings, making them more obvious. More importantly, alternate configurations are preserved whenever the Project.net software is upgraded, while the default configuration loses any changes.

Note, Project.net can have more than one active configuration. Which configuration is selected for a user is determined by the URL or IP address he or she used to access the Project.net server. For example, users accessing the server through projects.mycompany.com may see the results of the default configuration, while those using custom-projects.mycompany.com could see a site customized by an alternate configuration.

9.3.1 Modify the default configuration

You must change one token in the default configuration.

Instructions

  1. From within the Application Administration interface, chose Manage / Configurations.
  2. Click on Project.net Configuration from the list of configurations.
  3. Choose Tokens from the menu on the left.
  4. Enter defaulthost in the Token Name: search field and click the Filter button.
  5. Change the Project.net Default value of prm.global.brand.defaulthost to the external name of the Project.net website. Usually, this is the same as the siteHost variable above.
  6. Submit your changes. They will not take effect until the server has been restarted from the Tomcat Management Console or the Windows Services Console.

9.3.2 Create a custom configuration

Follow these steps to create a installation-specific configuration

Instructions

  1. From within the Application Administration interface, chose Manage / Configurations.
  2. Click the Create icon to create a new configuration.
  3. Enter:
    • Name - Suggestion: use Standard Production Configuration or use the value used for the siteHost token.
    • Description - Suggestion: include the siteHost value as part of the description.
    • Abbreviation – This will be used as part of the token identifier.
    • Choose the Default Language. You can leave this as the default value.
    • Select multiple Supported Languages by holding down the Control key while clicking the desired names. You can leave this as the default value.
    • Supported Host Names (CSV) – The values in this field determine when this configuration set will be used. List the web site names you want associated with configuration, separated by commas. If you enter projects.mycompany.com, login.projects.mycompany.com either address will cause the values in this configuration set to be used, in conjunction with the values from the default configuration.
  4. Submit your changes to create the configuration set.

9.3.3 Site-specific token values

Follow these steps to create a installation-specific configuration

Instructions

  1. From within the Application Administration interface, chose Manage / Configurations.
  2. Click on the name of the custom configuration from the list of configurations.
  3. Choose Tokens from the menu on the left.
  4. Select Basic Branding from the Category list.
  5. Click Filter
  6. Set the appropriate values for the tokens below.
  7. If a token does not appear in the list you can enter its name in the Token Name: search field and click the Filter button to locate it.
    prm.global.brand.defaulthost: Same as the default configuration token
    prm.global.brand.defaultjsprooturl: /
    prm.global.brand.defaulttimezone
    prm.global.brand.defaultsitescheme: http://
    prm.global.login.channel.login.title
    prm.global.brand.logo.login.href
    prm.global.default.site.href
    prm.global.footer.copyright.href
    prm.global.login.requestinformation.text
    prm.global.default.email.fromaddress
    prm.global.help.feedback.emailaddress
    prm.global.help.info.emailaddress
    prm.global.help.legal.emailaddress
    prm.global.help.sales.emailaddress
    prm.global.help.support.emailaddress
    prm.base.errors.reportErrors.email 
    
  8. Submit your changes. They will not take effect until the server has been restarted from the Tomcat Management Console or the Windows Services Console.

For information on customizing Project.net with your company's text and images see Customizing Project.net.


Step 10: Install the Master License Properties for your Server

All Project.net servers require Project.net Master Properties. Without these properties it is not possible to register as a user or log in except as the application administrator.

Prerequisites

  • The document Installing Licensing Files.pdf from the Downloads page contains complete details. A brief summary of the license installation steps is listed below.
  • The Master License Properties and License Key files for Open Source installations are available from the Downloads page.

Instructions

  1. If not already logged into the Project.net server, log into http://localhost:20000 as appadmin user.
  2. From the Personal Workspace, click Application Space on the lower left to enter the Application Administration interface.
  3. Select Licensing in the left navigation bar.
  4. Click on the light blue Licensing Tasks tab near the top of the screen.
  5. Click on Update License Properties.
  6. Follow the steps on the screen, pasting in the license properties from the license file you received from Project.net.
  7. Again, click on the light blue Licensing Tasks tab near the top of the screen.
  8. Click on Install a new license.
  9. Follow the steps on the screen, pasting in the license key from the license file you received from Project.net.

Step 11: Web server front-end integration

The final step is to link the Tomcat server to a web server. This is useful if you want Project.net to act as the default (Port 80) website on the system. Using Tomcat's built in web server to handle requests on Port 80 opens a security hole, therefore, you will need to use either Apache httpd web server or Microsoft IIS. The web server will handle the requests coming from the user and marshal the appropriate ones to the Tomcat server for processing by the Project.net application.

Prerequisites

OR

  • An IIS Web Server 5.0 or above (Recommended IIS 6.0)

Instructions (Apache installations)

Linux

  1. If running, stop the Apache server with apachectl -k stop
  2. Confirm the version of the Apache web server with the following command: apachectl -v
  3. Verify that the Apache server was built with the mod_so module. Run the command apachectl /httpd2 -l and look for mod_so.c in the results list. If you cannot find this module, you should reinstall or rebuild Apache.
  4. Edit /etc/httpd/conf/httpd.conf
  5. Make sure the following lines are uncommented:
      LoadModule proxy_module modules/mod_proxy.s
      LoadModule proxy_http_module modules/mod_proxy_http.so
    
  6. Add the following lines to the end of the file:
    #tomcat integration
    ProxyPreserveHost On
    ProxyPass / http://<application server dns name>:8080/
    ProxyPassReverse / http://<application server dns name>:8080/
    
  7. Save the file and verify the configuration settings by executing the command apachectl /httpd2 -t. The command should display a 'Syntax OK' message.
  8. The integration is complete, re-start the Apache server with apachectl -k start.
  9. You should be able to reach the Project.net login screen just by using a browser to go to http://<hostname>

Windows

  1. If running, stop the Apache server.
  2. Confirm the version of the Apache web server with the following command: apache.exe -v
  3. Verify that the Apache server was built with the mod_so module. Run the command apache.exe/httpd2 -l and look for mod_so.c in the results list. If you cannot find this module, you should reinstall or rebuild Apache.
  4. Edit c:\Program Files\Apache Software Foundation\Apache 2.2\conf\httpd.conf
  5. Search for and uncomment the following lines by removing the '#' at the beginning of each line:
    (line 99)  LoadModule proxy_module modules/mod_proxy.s
    (line 103) LoadModule proxy_http_module modules/mod_proxy_http.so
    
  6. Add the following lines to the end of the file:
    #tomcat integration
    ProxyPreserveHost On
    ProxyPass / http://<application server dns name>:8080/
    ProxyPassReverse / http://<application server dns name>:8080/
    
  7. Verify the configuration settings by executing the command apache.exe/httpd2 -t. The command should display a 'Syntax OK' message.
  8. The integration is complete, re-start the Apache server.

Instructions (IIS installations)

Windows Only

1. Configure the Connectors

  • Download the appropriate connector and place it in its own directory and create the isapi_redirect-1.2.26.properties file. This can be downloaded from the following:
  • http://tomcat.apache.org/download-connectors.cgi and choose the binary download version 1.2.26.
  • Create a Directory under $CATALINA_HOME/connectors and place the isapi_redirect-1.2.26.dll and isapi_redirect-1.2.26.properties.Create the properties files. You have to modify them appropriately. Here is an example of isapi_redirect-1.2.26.properties file.
# This must be in a virtual directory with execute privileges

extension_uri=/jakarta/isapi_redirect-1.2.26.dll

# Full path to the log file for the ISAPI Redirector

log_file=C:\apache-tomcat-5.5.23\logs\connectors\isapi_redirect.log

# Log level (debug, info, warn, error or trace)

log_level=debug

# Full path to the workers.properties file

worker_file=C:\apache-tomcat-5.5.23\conf\workers.properties

# Full path to the uriworkermap.properties file

worker_mount_file=C:\apache-tomcat-5.5.23\conf\uriworkermap.properties
  • Next we will add the worker.properties and uriworkermap.properties files to the $CATALINA_HOME/conf directory.

workers.properties

# Define 1 real worker using ajp13

worker.list=worker1

# Set properties for worker1 (ajp13)

worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

uriworkermap.properties

/*=worker1 or if it is in NON ROOT location /pnet/*=worker1

2.Configure the Registries

Next we need to make registry entries.

  Start -> Run -> regedit

   * Create a Reg Key in HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\2.0

and Create the Following String Values

Value Name Value Data
extension_uri /jakarta/isapi_redirect-1.2.26.dll
log_file C:\apache-tomcat-5.5.23\logs\connectors\isapi.log
logLevel debug (OR) info (OR) error
worker_file C:\apache-tomcat-5.5.23\conf\workers.properties
worker_mount_file C:\apache-tomcat-5.5.23\conf\uriworkermap.properties

3.Configure IIS

  • Start with the application pools and create a new application pool.
  • Create a Web Service Extension called jakarta. Add to the Files list the connector dll file from the $CATALINA_HOME/connectors/ directory .Then set the service to allowed.
  • Create new website for web application and be certain that you now specify the appropriate IP address for each site as well as Host headers if used.
  • For website, create a virtual directory called jakarta. Point this virtual directory to the directory that holds the appropriate connector. (ex www.test4.project.net/jakarta would point to $CATALINA_HOME/connectors/)
  • Under the Home directory select the home directory as C:\apache-tomcat-5.5.23\webapps\ROOT, select the configuration button and add the .jsp extension to each site once again pointing them to the appropriate connector dll.
  • Also under the Home directory, make certain you select the appropriate Application Pool that you already created and give it Scripts and Executables permission.
  • Now go to the ISAPI Filters tab and add a filter called jakarta. This also needs to point to your connector dll file.
  • Now click Apply and OK, and restart the IIS service.
  • After restarting the service, go back to the ISAPI Filters tab and make certain you see a green arrow. If you do not, recheck all of your settings.
  • After Configured reboot the Machine Once

Step 12: Improve Tomcat performance in a Linux environment

You may see this warning in the Tomcat logs:

The Apache Tomcat Native library which allows optimal performance in production
environments was not found on the java.library.path

To resolve this warning you should use Apache Portable Runtime, which may improve Tomcat performance. Detailed instructions are available at http://tomcat.apache.org/tomcat-5.5-doc/apr.html.

Prerequisites

Instructions (Linux installations)

  1. Download Apache Portable Runtime installation package for your operating system and unpack in a directory.
  2. Check if everything is OK by executing:
       ldd /path_to_libs/libtcnative-1.so
    
    All dependencies should be ok.
  3. Add this variable to your environment:
      export LD_LIBRARY_PATH=/path_to_libs/native.lib/
    
  4. Now, start Tomcat.

If you still see a warning, then add the path to SSL to the LD_LIBRARY_PATH variable.

  1. Find locate SSL:
        whereis ssl
    
  2. Modify:
        export LD_LIBRARY_PATH=/path_to_libs/native.lib/:/path_to_ssl_libs
    
  3. Start Tomcat and check whether the warning does not appear.
  4. Also add LD_LIBRARY_PATH init to your Tomcat startup script.

If you still have problems, check official Tomcat documentation: http://tomcat.apache.org/tomcat-5.5-doc/apr.html


Step 13: Finished

  1. Installation is now complete, the Project.net application should now be accessible using the URL: http://your-server/
  2. The Apache Tomcat Manager Console is available using the following URL: http://localhost:7001/console.
  • Use the user name and password you selected above.
  • The default login is: manager
  • The default password is: manager
  • Replace localhost with the name of your application server machine if accessing remotely. You may have to open port 7001 on your application server machine

Attachments