Contained WithinFind More DocumentationFeatured Support Resources | Scarica il manuale in formato PDF (2025 KB)
Chapter 5 Installing in Silent ModeSilent installation is a non-interactive method used for installing Sun JavaTM Enterprise System (Java ES) on multiple hosts that share similar configurations. This chapter provides instructions for using silent mode to install the Java ES software. This chapter includes the following sections: How Silent Installation WorksTo run a silent installation, you first run an interactive installation session using the silent install syntax of the installer command. During the interactive session, your responses to the installer are captured as a set of name-value pairs in a state file. Each name-value pair represents a single prompt or field in the installation process. With the state file as input, you can then run the installer on other hosts. This process allows you to propagate one configuration across multiple hosts in your deployment. The installer cannot run a state file from a different version of Java ES. That is, if you create your state file using Java ES 5, you cannot use this state file to install Java ES 2005Q4. The following table presents the main events in a silent installation. Links to instructions are in the right column. Table 5–1 Silent Installation Events
Creating a State FileTo create a state file, you must run an interactive session of the installer. A state file generated by the installer takes advantage of the installer’s real-time dependency checking and error reporting. Do not create a state file manually. This method can cause problems at installation time, configuration time, or server startup time. Generating the Initial State FileYou create the initial state file by running the installer interactively using the parameters of the installer command that tell the installer to capture your answers. As you proceed through the pages of the installer, your answers are captured and a state file is generated. The installer determines the order of the product components to be installed, so you can specify the components in any order. When you complete the installation, the state file is available in the location that you specified. You can use the -no option if you do not want software to be installed during this session. Syntax examples:
Full syntax for the installer command can be found in Appendix B, Installation Commands. Refer to Appendix C, Example State File to see an example of a generated state file. Editing the State FileAfter you have generated a state file, you must edit the state file to ensure that the local parameters are set correctly for the destination host. These parameters include host name, domain name, IP address, and other such settings. In a state file created for silent installation, some parameters specify sensitive data, such as administrator passwords. Make sure to secure the file as appropriate for your deployment. You might also need to change the state file ID, if you plan to do an installation on a platform that is different from the one on which you generated the initial state file. This section addresses the following topics: State File Editing GuidelinesWhen editing the state file, follow these guidelines:
Editing Local ParametersThe following table lists parameters that you might need to edit, depending on the product components you want to install or on your host. 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 the tables in Chapter 3, Configuration Information, in Sun Java Enterprise System 5 Installation Reference for UNIX. Table 5–2 State File Parameters Often Edited for Silent Installation
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. Each platform has a different type of state file ID.
|
cd installer-directory |
Run the installer command using 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] |
You should run 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 9, Troubleshooting.
Silent installation can be lengthy, depending on the quantity and type of product components that you are installing.
Verify that your state file is edited correctly for the host.
In a state file created for silent installation, some parameters specify sensitive data, such as administrator passwords. Make sure to secure the file as appropriate for your deployment.
If you are not logged in as root, become superuser.
Navigate to the directory where the installer utility is located.
cd installer-directory |
Run the installer using the following syntax:
./installer -noconsole -state statefile |
Start the installer in silent mode, suppressing the user interface.
Use the specified state file as input to a silent installation.
Specify an absolute or relative pathname to a state file.
After installation is complete, proceed to the next host and repeat Steps 1 through 4.
To monitor a silent installation, navigate to the log file directory:
Solaris OS: cd /var/sadm/install/logs
Linux and HP-UX: cd /var/opt/sun/install/logs
Locate the log files for the current installation.
The shared components are installed first and the product components follow. The timestamp variable represents the time the log was created. The variable has the format MMddhhmm.
Specifies the month
Specifies the date
Specifies the hour
Specifies the minute
Use the tail command to watch messages as they are written to the logs:
tail -f logfile-name |
To exit the tail program, press Ctrl+C.
After you have completed the installer portion of your Java ES installation, proceed as follows:
Chapter 6, Completing Postinstallation Configuration provides instructions on postinstallation configuration.
Verifying After Installation provides instructions for verifying that this phase of installation was successful.