J2EE Policy Agents Guide |
Appendix A
Silent InstallationIn addition to the GUI installation and the Command Line installation, you can do a silent installation of J2EE Policy Agents. This appendix provides steps for doing that.
About Silent Installation/UninstallationSilent installation/uninstallation provides a means for scripting the installation/uninstallation. When you perform a silent installation/uninstallation, you use a state file, to provide all the answers that you would normally supply to the installation/uninstallation program interactively. This saves time and is useful when you want to install/uninstall multiple instances of Sun ONE Identity Server Policy Agent using the same parameters in each instance.
Silent installation is a simple two-step process. First, you generate a state file that records the installation/uninstallation process and all the inputs you provide. Then you run the installation/uninstallation program with the state file as the input source.
Generating a State File for Installation
To generate a state file, do the following:
- Change to the directory where the installation program is located.
- Enter one of the following commands if you are running the GUI installation program.
If you are on Solaris, HP-UX, AIX, or Linux, enter:
# ./setup.sh -saveState StateFile
If you are on Windows, enter:
C:\> setup.bat -saveState StateFile
You can give a name of your choice to the state file. Follow the instructions as specified in the section "Using the GUI Installation Program."
- Alternatively, you can enter one of the following commands if you are using the command line installation program.
If you are on Solaris, HP-UX, AIX, or Linux, enter:
#./setup.sh -nodisplay -saveState stateFile
If you are on Windows, enter:
C:\setup.bat -nodisplay -saveState stateFile
You can give a name of your choice to the StateFile. Follow the instructions as specified in the section "Using the Command-Line Installation Program."
- Proceed through the installation. Your answers to the prompts are recorded in the state file. When the installation is complete, the state file is created in the same directory where the installation program is located.
Using the State File for Silent Installation
To perform silent installation using the state file, do the following.
- Change to the directory where the installation program and the state file are located.
- Enter the following command:
If you are on Solaris, HP-UX, AIX, or Linux, enter:
# ./setup.sh -nodisplay -noconsole -state StateFile
If you are on Windows, enter:
C:\> setup.bat -nodisplay -noconsole -state StateFile
The installation takes place hidden from your view. On completion, the program exits automatically and displays the prompt.
Generating a State File for Uninstallation
To generate a state file for uninstallation, do the following.
- Change to the agent installation directory, where the uninstallation program is located.
- Enter one of the following commands if you are using the GUI installation program:
If you are on Solaris, HP-UX, AIX, or Linux, enter:
# ./uninstall.sh -saveState StateFile
If you are on Windows, enter:
C:\> uninstall.bat -saveState StateFile
You can give a name of your choice to the state file. Follow the instructions as specified in the section "Using the GUI Uninstallation Program" to proceed with the uninstallation.
- Alternatively, you can enter one the following commands if you are using the command line installation program.
If you are on Solaris, HP-UX, AIX, or Linux, enter:
#./uninstall.sh -nodisplay -saveState stateFile
If you are on Windows, enter:
C:\> uninstall.bat -nodisplay -saveState stateFile
You can give a name of your choice to the state file.
- Proceed through the uninstallation program as explained in "Using the GUI Uninstallation Program". Your answers to the prompts are recorded in the state file. When uninstallation is complete, the state file is created in the same directory where the uninstallation program is located.
Using the State File for Silent Uninstallation
To perform silent uninstallation using the state file, do the following:
- Change to the agent installation directory where uninstallation program and the state file are located.
- Update the state file with the ID of the uninstallation program class as follows:
If you are on Solaris, HP-UX, AIX, or Linux, enter:
#./uninstall.sh -id
If you are on Windows, enter:
C:\> uninstall.bat -id
This command will print the id of the uninstallation program class file.
- Replace the ID in the state file with this ID.
- Begin the uninstallation process by using one of the following commands:
If you are on Solaris, HP-UX, AIX, or Linux, enter:
# ./uninstall.sh -nodisplay -noconsole -state StateFile
If you are on Windows, enter:
C:\> uninstall.bat -nodisplay -noconsole -state StateFile
The uninstallation takes place hidden from your view. On completion, the program exits automatically and displays the prompt.