Sun Java Enterprise System 2005Q1 Installation Guide |
Chapter 9
Installing in Silent ModeSilent installation is a non-interactive method used for installing Sun Java Enterprise System (Java ES) on multiple hosts that share similar configurations. This chapter provides instructions for using the silent mode to install the Java ES software.
This chapter includes the following sections:
Silent Installation ProcessTo run a silent installation, you first run a false installation session to create a state file that the actual silent installation process will access. During this false, interactive session, your responses to the installer are captured as a set of name-value pairs in the state file; no software is installed. (Each name-value pair represents a single prompt or field in the installation process.) Using the state file as input, you can then run the installer on many hosts. This process allows you to propagate one configuration across multiple hosts in your enterprise.
The following table lists the Java ES silent installation events. The left column lists the high-level tasks and subtasks, and the right column lists the location of instructions for performing the tasks.
Creating a State FileTo create a state file, you must run the installer. A state file generated by the installer takes advantage of the installer’s real-time dependency checking and error reporting.
Caution
Do not create a state file manually. This method can cause problems at installation time, configuration time, or server start-up time.
Generating a State File
A state file is created by running the installer without installing the software. As you proceed through the pages of the installer, your answers are captured and a state file is generated. When you complete the installation, the state file is available in the location that you specified. You can generate the state file by running either the graphical interface installer or the text-based interface installer. The -no option is used so no software is installed.
To create a statefile using the graphical interface:
./installer -no -saveState statefile_name
To create a statefile using the text-based interface:
./installer -no -nodisplay -saveState statefile_name
Full syntax for the installer command can be found in Installer Command. Further installation instructions are in Chapter 7, "Installing with the Graphical Interface" or Chapter 8, "Installing with the Text-Based Interface."
Refer to Appendix E, "Example State File" for an example of a generated state file.
Editing the State File
After you have generated a state file, you must edit it to ensure that the local parameters are set correctly for the various destinations hosts. These parameters include host name, domain name, IP address, and other such settings. You might also need to change the state file key, if you plan to do an installation on a platform that is different from the one on which you created the state file.
This section addresses the following:
State File Editing Guidelines
When editing the state file, follow the guidelines in this section.
- Do not modify parameters, except to edit their values.
- Notice original types and formats and maintain them as you enter new values. For example:
- Replace any value that you delete. If the parameter is required, installation or configuration could fail if the parameter has been deleted.
- Retain the case of the original value.
Editing Local Parameters
The following table lists parameters that you might need to edit, depending on the components you wish to install. The parameters you must edit also depend on your host setup. For example, the host on which you generated the state file might be in the same domain as the host on which you are installing.
For a description of each parameter, refer to Chapter 4, "Configuration Information."
Creating a Platform-Appropriate State File IDA state file can only be run on a host of the same platform type as the host where the state file was generated unless you edit the state file ID manually. There is a different type of state file ID for various Java ES platforms.
The following procedures explain how to edit a state file to run it on a platform other than the one on which it was created.
To Generate a State File ID Using the Installer
This procedure generates a state file ID by running the installer on the platform on which you want to perform silent installation.
Note
The following command works only if you are generating an ID for the same platform on which you are running the command.
- If you are not logged in as root, become superuser.
- Navigate to the directory where the installer is located:
cd installer-dir
- Run the installer with the -id option.
./installer -id
The command generates an encrypted identifier.
- 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) Enterprise System f31c7e86a64605bc5b9b629931a30b275a0eb447]
.
.
.
[STATE_DONE Sun Java(tm) Enterprise System f31c7e86a64605bc5b9b629931a30b275a0eb447]To Generate a State File ID Using Platform-Specific Distribution Files
This procedure generates a state file ID by using the Java ES distribution files for a specific platform. The Java ES distribution DVD contains all platform-specific distributions. This procedure also works if you download a single platform-specific distribution.
Note
The following command works even if you are generating an ID for a platform different from the one on which you are running the command.
In the platform/.install directory, run this command:
java -classpath . -D"wizard.idInfo" class
where platform and class are:
The command generates an encrypted identifier.
- 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) Enterprise System f31c7e86a64605bc5b9b629931a30b275a0eb447]
.
.
.
[STATE_DONE Sun Java(tm) Enterprise System f31c7e86a64605bc5b9b629931a30b275a0eb447]
Running the Installer in Silent ModeRun the installer on a host that has the same operating system as the host on which you generated the state file. If you cannot do this, refer to Creating a Platform-Appropriate State File ID.
If you have problems during installation, refer to Chapter 13, "Troubleshooting".
To Run the Installer in Silent Mode
- Open a terminal window on the host where you want to install the Java ES components.
- If you are not logged in as root, become superuser.
- Navigate to the directory where the installation program is located.
cd installer-directory
- Start the installer with the following options:
./installer -nodisplay -noconsole -state statefile
where
Silent installation can be lengthy, depending on the number and type of components that you are installing. While the installer is running, you can monitor its progress by examining changes to the installation log.
To Monitor the Progress of a Silent Installation
- In a terminal window, change to the log file directory:
On Solaris:
cd /var/sadm/install/logsOn Linux:
cd /var/opt/sun/install/logs- Locate the log files for the current installation.
The shared components are installed first and the components products follow. The log files have names based on the following format:
Java_Enterprise_System_Shared_Component_Install.datetimestamp Java_Enterprise_System_install.Bdatetimestamp
The timestamp variable represents the time the log was created. The variable has the format MMddhhmm, where:
- Use the tail command to watch messages as they are written to the logs. Use this format:
tail -f log-file-name
To exit the tail program, press Ctrl+C.
Next StepsAfter you have completed the installer portion of your Java ES installation, proceed to Chapter 10, "Configuring Components After Installation" for final instructions. Although you might have done extensive configuration during your installation, most components require some additional configuration.