Sun Java Enterprise System 2003Q4 Installation Guide |
Chapter 7
Installing Software in Silent ModeSilent installation is useful for installing Java Enterprise System on multiple hosts that share similar configurations. Silent installation requires that you run the installer once to capture the values that you provide in a state file. The state file that contains your responses is a list of parameters, each representing a single prompt or field.
You can then run the installer on many hosts, using the same state file as input. This process propagates one configuration across multiple hosts in your enterprise.
This chapter includes the following sections:
Preinstallation StepsBefore creating a state file, you must perform the same preinstallation steps that you perform for an interactive installation. Refer to the following chapters, if you have not done so already:
- Chapter 2, "Preparing for Installation" contains information on system requirements and other important planning information.
- Chapter 3, "Gathering Installation and Configuration Information" contains information on each question that the installer asks. The chapter associates each question with the state file parameter that you set by answering the question.
GuidelinesIf you are an experienced user of Java Enterprise System components, you might be accustomed to building state files manually. This method can cause problems at installation time, configuration time, or server start-up time.
Follow these guidelines for successful silent installation:
- Allow the installer to generate the state file for you, as described in "Generating a State File".
Do not 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.
- Save a copy of the state file before making any edits.
- Do not modify parameters, except to edit their values.
- Use these guidelines when editing the values:
Generating a State FileTo generate a state file, you must first run the installer using either the graphical interface or the text-based interface. Review carefully either of the following chapters before running the installer—careful preparation is essential to a successful installation.
Chapter 5, "Installing Software Using the Graphical Interface"
Chapter 6, "Installing Software Using the Text-Based Interface"
To Generate a State File
- If you are planning to use the graphical interface of the installer, provide access to your display.
If you are logging in to a remote machine, or using the su command to become superuser on a local machine, use the xhost command on the local machine to allow access to your local display. For example, use the following command to grant access to all users:
xhost +
If you are logging in to a remote machine, make sure your DISPLAY environment variable is properly set to the local display. If the DISPLAY variable is not set properly, the installer runs in text-based mode. For example, if your machine name is myhost:
(C Shell) % setenv DISPLAY myhost:0.0
(Korn Shell) $ DISPLAY=myhost:0.0- If you are not logged in as root, become superuser.
- Navigate to the directory where the installer program is located.
cd installer-directory
- Start the installer, providing a pathname for the state file. The format for the installer command is as follows:
./installer [-no] [-nodisplay] -saveState [statefile]
where:
- Proceed through the pages of the installer, following the instructions specified in "Installing Software Using the Graphical Interface".
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.
Editing the State FileBefore you perform 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 installation machine.
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.
Editing Local Parameters
The following table lists parameters that you might need to edit, depending on the components you are installing. The parameters you must edit also depend 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.
For a description of each parameter, refer to Chapter 3, "Gathering Installation and Configuration Information."
Creating a Platform-Appropriate ID
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:
There are two procedures for editing a state file so that you can run it on a platform other than the one on which it was created.
Generating 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.
To Generate a State File ID Using the Installer
- 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]
Generating a State File ID Using Platform-Specific Distribution Files
This procedure generates a state file ID by using the Java Enterprise System distribution files for a specific platform. The Java Enterprise System distribution DVD contains all of the platform-specific distributions. This procedure also works if you downloaded a single platform-specific distribution.
To Generate a State File ID Using Platform-Specific Distribution Files
- Navigate to the platform-specific .install directory:
cd platform/.install
where the value of platform can be Solaris_sparc or Solaris_x86.
- Enter one of the following commands to generate the ID for a specific platform:
- 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:
Running the Installer in Silent ModeRun the installer on a machine that has the same operating system as the machine on which you generated the state file.
To Run the Installer in Silent Mode
- Open a terminal window on the host where you want to install the Java Enterprise System components.
- If you are not logged in as root, become superuser.
- Navigate to the directory where the installer program is located.
cd installer-directory
- Start the installer with the following options:
./installer -nodisplay -noconsole -state statefile
where
Execution can be lengthy, depending on the number and type of components that you are installing. While the installer is executing, you can monitor its progress by noting changes to the installation log.
To Monitor the Progress of a Silent Installation
- In a terminal window, use the cd command to change to the log file directory.
cd /var/sadm/install/logs
- Locate the log files for the current installation.
There are two log files. The shared components are installed earlier in the installation and the remaining components follow. The two log files have names based on the following format:
Java_Shared_Component_Install.datetimestamp Java_Enterprise_System_install.Bdatetimestamp
The timestamp variable represents the time the log was created. It 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
Next StepsAt the end of this chapter you should have completed the installer portion of your Java Enterprise System installation. Proceed to "Postinstallation Configuration and Startup" for final instructions on configuring the component products for your environment.
If you want to make an installation image available to other administrators in your enterprise, refer to "Setup Instructions for Network Installation".