C H A P T E R 7 |
Installing and Uninstalling In Silent Mode |
This chapter describes how to install and uninstall Java Studio Enterprise software in silent mode.
This chapter covers the following topics:
Silent installation is useful for installing Java Studio Enterprise on multiple hosts that share similar configurations. Silent installation requires that you run the installer once to capture input values in a state file. The state file contains your responses as a list of parameters, each representing a single prompt or field. You can then run the installer on many hosts, using the state file as input after editing certain host-specific values. This process propagates one configuration across multiple hosts in your enterprise.
This section covers the following topics:
Before creating a state file, perform the same preinstallation steps that you perform for an interactive installation. Refer to Preparing for Installation and for Solaris OS machines, see Verifying the Solaris OS Patch Requirements, if you have not done so already.
Review the guidelines for using silent mode.
If you are an experienced user of Java Studio Enterprise server components, you might be accustomed to building state files manually. This method can be error-prone.
Follow these guidelines for successful silent installation:
Do not manually create an original state file. A state file generated by the installer takes advantage of the installer's real-time dependency checking and error reporting.
To prepare a state file, you must first run the installer using the graphical interface and command-line options to suppress actual installation. Use the procedure To Generate a State File. Then, you edit the state file for use on the specific target machine. See the section, Editing the State File.
1. Log in with the proper permission for installing.
a. Use the xhost command to grant access to your display.
b. Set the DISPLAY environment variable to display to your local system.
c. If you are not logged in as root, become superuser.
2. Change to the directory where the installer program is located.
For example, if you downloaded the files from the web:
3. Start the installer, providing an absolute path name for the state file. The format for the installer command is as follows:
4. Proceed with running the installer, following the instructions specified in the installation chapter for your platform.
As you respond to the installer, it records your answers in the state file. When you complete the installation, the state file is available in the location that you specified.
Before you do a silent installation, edit the state file to ensure that local parameters such as host name, domain name, IP address, and other such settings are appropriate for the target installation machine. Read the section Editing Local Parameters.
You might also need to change the state file key, if you plan to install on an operating system that is different from the one on which you created the state file. Read the section Creating a Platform-Appropriate ID.
The following table lists parameters that you might need to edit, depending on your machine setup. For example, the machine on which you generated the state file might be in the same domain as the machine on which you are installing, or not.
You cannot generate a state file on a machine whose operating system is different from the machine on which you execute the state file. There is a different type of state file ID for the following three platforms:
The following procedure generates a state file ID by running the installer on the platform on which you want to perform silent installation.
1. Log in with the proper permissions.
2. Change to the directory where the installer is located.
3. Run the installer with the -id option.
The command generates an encrypted identifier.
4. Copy the identifier and paste the value into the state file, as the value for the STATE_BEGIN and STATE_DONE parameters.
The following is an example of the state file identifier within a state file:
[STATE_BEGIN Sun Java(tm) Studio Enterprise f31c7e86a64605bc5b9b629931a30b275a0eb447] . . . [STATE_DONE Sun Java(tm) Studio Enterprise f31c7e86a64605bc5b9b629931a30b275a0eb447] |
Run the installer on a machine that has the same operating system as the machine on which you generated the state file or follow the procedure for creating a new state file ID that will match the platform of the target installation machine. See the section To Generate a State File ID Using the Installer.
1. Open a terminal window on the host where you want to install the Java Studio Enterprise components.
2. (Solaris OS only) Prepare for installing by providing access to the X server and setting your environment display variable.
a. Provide access to your display.
b. Make sure your DISPLAY environment variable is properly set to the local display. For example, if your machine name is myhost:
3. Log in with the proper permissions.
4. Change to the directory where the installer program is located.
5. Start the installer with the following options:
Execution can be lengthy, depending on the number and type of components that you are installing.
6. (Optional- Solaris OS only) Monitor the progress of silent installation.
While the installer is executing, you can monitor its progress by noting changes to the installation log. Follow these steps:
a. In a terminal window, use the cd command to change to the log file directory. For example:
b. Locate the log files for the current installation.
For more information on the Java Studio Enterprise log files, see Examine Installation Log Files.
c. Use the tail command to watch messages as they are written to the logs. For example:
Silent uninstallation is useful for automated uninstallation of Java Enterprise System components on multiple hosts that share similar configurations. Silent uninstallation requires that you run the uninstaller once to allow the uninstaller to capture provided values in a state file.
The procedure for uninstalling in silent mode is similar to the procedure for installing in silent mode. For information on using silent mode, refer to Preparing for Installing in Silent Mode and to the section Preparing a State File. For silent uninstall, the only host-specific parameter that you might need to edit is the state file ID as explained in Creating a Platform-Appropriate ID.
The basic procedure to uninstall in silent mode is to:
1. (Solaris OS only) Prepare for installing by providing access to the X server and setting your environment display variable.
a. Provide access to your display.
b. Make sure your DISPLAY environment variable is properly set to the local display.
2. Log in with the proper permissions
3. Change to the directory containing the uninstaller:
4. Run the uninstaller with the following command:
Instructs the uninstaller to generate a state file at the location specified by statefile. Specify an absolute path to the state file you want to create. |
|
5. Proceed through the uninstaller to completion.
As you respond to the uninstaller, the uninstaller records your answers in the specified state file. When you complete the uninstallation, the state file is available in the location that you specified.
6. Use a copy of the state file for each host on which you are going to perform a silent uninstall, editing the state file ID if necessary.
If you want to use this state file to uninstall Java Studio Enterprise on a machine with a different OS than the machine where you generated the state file, you need to replace the state file ID appropriately. This procedure is explained in Creating a Platform-Appropriate ID.
1. Make sure you have properly prepared and edited the state file, as explained in Step 6 in the preceding procedure, To Generate a State File
2. Verify that you have the proper permissions to uninstall.
3. Change to the directory containing the uninstaller.
4. Start the uninstaller from the command line, using the following options:
While the uninstaller is running, you can monitor its progress by examining the uninstallation log.
1. In a terminal window, change to the log file directory.
2. Locate the log files for the current uninstallation.
The log file of interest for monitoring purposes is:
The timestamp variable represents the time the log was created. It has the format MMddhhmm, where:
3. Use the tail command to watch messages as they are written to the logs.
Copyright © 2004, Sun Microsystems, Inc. All rights reserved.