Sun Java System Access Manager Policy Agent 2.2 Guide for Apache Tomcat 5.5 Servlet/JSP Container

Chapter 6 Uninstalling Policy Agent 2.2 for Apache Tomcat Servlet/JSP Container

The agentadmin program is used for initiating the installation and uninstallation programs of Policy Agent 2.2 for Apache Tomcat Servlet/JSP Container. The difference is that the installation program is started with the --install option while the uninstallation program is started with the --uninstall option. For more information about the agentadmin program, see Key Features and Tasks Performed With the J2EE agentadmin Program. The uninstallation program is similar to the installation program in that it provides step by step explanations of the information you need to enter. However, the uninstallation program has fewer and simpler steps.

The uninstallation process follows a series of tasks similar to the installation process. First, perform the pre-uninstallation (preparation) steps. Then, perform the uninstallation, itself.

The uninstallation process differs depending upon the format of the deliverable files used during the initial installation of the agent: package formatted deliverable files or non-package formatted deliverable files.

If package formatted deliverables were used for installation of the agent, the uninstallation involves a single step.

If non-package formatted deliverables were used for installation, uninstallation consists of two phases. The first phase of uninstallation is the launching of the uninstallation program. The second phase of uninstallation involves interacting with the uninstallation program. During this phase, the program prompts you step by step to enter specific information while providing you with explanations about that information.

You must access the PolicyAgent-base directory for uninstallation-related tasks. For more information about this directory, see J2EE Agent Directory Structure in Policy Agent 2.2.

Preparing to Uninstall Agent for Apache Tomcat Servlet/JSP Container

Perform the pre-uninstallation (preparation) steps outlined in this section before uninstalling Policy Agent 2.2 for Apache Tomcat Servlet/JSP Container.

ProcedureTo Prepare to Uninstall Agent for Apache Tomcat Servlet/JSP Container

To prepare for the uninstallation of Policy Agent 2.2 for Apache Tomcat Servlet/JSP Container, perform the following steps:

  1. Undeploy any protected applications from Apache Tomcat Servlet/JSP Container.

    Refer to the Apache Tomcat Servlet/JSP Container documentation for more information.

  2. Restore the deployment descriptors of these applications to their original deployment descriptors.

  3. Ensure that the Apache Tomcat Servlet/JSP Container instance from which you are about to uninstall the agent is not running.

  4. Undeploy the agent application.

    The agent application must be undeployed from Apache Tomcat Servlet/JSP Container before the agent is uninstalled.

    The agent application was installed during the post-installation steps. For more information about the installation of this application see Chapter 3, Installing Policy Agent 2.2 for Apache Tomcat Servlet/JSP Container.

Solaris Systems — Packages: Uninstalling Agent for Apache Tomcat Servlet/JSP Container

This method of uninstalling Agent for Apache Tomcat Servlet/JSP Container does not apply to all Solaris system uninstallations. This method only applies when the agent was originally installed using package formatted deliverables. Such deliverables are installed by issuing the following command:

# pkgadd -d

Package formatted deliverables have the string “_SUNWam” in the name of the compressed file used for delivering the Policy Agent 2.2 software. The following file name is an example of package formatted deliverable file used for Policy Agent 2.2 for Apache Tomcat Servlet/JSP Container:

SJS_Tomcat_Server_55_agent_2.2_SUNWamtc.tar.gz

For more information about package formatted deliverables for Solaris systems, see To Unpack Package Formatted Deliverables of a J2EE Agent in Policy Agent 2.2.

To uninstall this agent when the original deliverables were not in package format, regardless of the platform, see Launching the Uninstallation Program of Agent for Apache Tomcat Servlet/JSP Container.

ProcedureTo Uninstall Agent for Apache Tomcat Servlet/JSP Container on Solaris Systems — Packages

    Issue the following command:

    # pkgrm SUNWamtc

    The preceding command removes the J2EE agent packages from the directory in which they were installed.

All Systems — Non-Packages: Uninstalling Agent for Apache Tomcat Servlet/JSP Container

This method for uninstalling Agent for Apache Tomcat Servlet/JSP Container applies when the agent was originally installed using non-package formatted deliverables. The term “non-package formatted deliverables” refers to the format of the compressed file used for delivering the Policy Agent 2.2 software. Package formatted deliverables have the string “_SUNWam” in the name of the compressed file. Therefore, non-package formatted deliverables do not have this string in the file name. The following two file names are examples of non-package formatted deliverable files used for Policy Agent 2.2 for Apache Tomcat Servlet/JSP Container:

SJS_Tomcat_Server_55_agent_2.2.tar.gz
SJS_Tomcat_Server_55_2.2.zip

This uninstallation process involves two phases as described in the following subsections.

Launching the Uninstallation Program of Agent for Apache Tomcat Servlet/JSP Container

Perform the steps outlined in this section to launch the uninstallation program of Policy Agent 2.2 for Apache Tomcat Servlet/JSP Container.

ProcedureTo Launch the Uninstallation Program of Agent for Apache Tomcat Servlet/JSP Container

To launch the uninstallation program, perform the following steps:

  1. Change to the following directory:

    PolicyAgent-base/bin

    This directory contains the agentadmin program, which is used for uninstalling a J2EE agent and for performing other tasks. For more information on the agentadmin program, see Key Features and Tasks Performed With the J2EE agentadmin Program.

  2. Issue one of the following commands:


    ./agentadmin --uninstall

    or


    ./agentadmin --uninstallAll

    These two commands are different in that the --uninstallAll option removes all configured instances of the agent.

    After you issue one of the preceding commands, the uninstallation program launches and presents you with the first prompt as illustrated in the following section.

Using the Uninstallation Program of Agent for Apache Tomcat Servlet/JSP Container

The steps in the uninstallation program are displayed in the following example. The interaction process of this uninstallation program is similar to that of the installation program. One difference is that the uninstallation program does not present a license agreement. For a more detailed explanation of the interaction process, see Using the Installation Program of Agent for Apache Tomcat Servlet/JSP Container.

Example of Uninstallation Program Interaction in Agent for Apache Tomcat Servlet/JSP Container


************************************************************************
Welcome to the Access Manager Policy Agent for Apache Tomcat 5.5 Servlet/JSP
Container

************************************************************************
Enter the complete path to the directory which is used by Tomcat Server to
store its configuration Files. This directory uniquely identifies the
Tomcat Server instance that is secured by this Agent.
[ ? : Help, ! : Exit ]
Enter the Tomcat Server Config Directory Path
[/opt/jakarta-tomcat-5.5.9/conf]: 


-----------------------------------------------
SUMMARY OF YOUR RESPONSES
-----------------------------------------------
Tomcat Server Config Directory :
/opt/jakarta-tomcat-5.5.9/conf 

Verify your settings above and decide from the choices below.
1. Continue with Uninstallation
2. Back to the last interaction
3. Start Over
4. Exit
Please make your selection [1]: 1

Removing the agent classpath from
/opt/jakarta-tomcat-5.5.9/bin/setclasspath.sh
scriptDONE.

Deleting the config directory
/agentinstall/j2ee_agents/am_tomcat_agent/agent_001/config
...DONE.

Removing SJS Tomcat Agent Realm from Server XML file :
/opt/jakarta-tomcat-5.5.9/conf/server.xmlDONE.

Removing filter from Global deployment descriptor file :
/opt/jakarta-tomcat-5.5.9/conf/web.xmlDONE.

Removing SJS Tomcat Agent Filter and Form login authentication from Web
applicationsDONE.


Uninstall log file location:
/agentinstall/j2ee_agents/am_tomcat_agent/logs/audit/uninstall.log

Thank you for using Access Manager Policy Agent