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:


Installing in Silent Mode

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:

Preparing for Installing in Silent Mode

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.

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.

Preparing a State File

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.


procedure icon  To Generate a State File

1. Log in with the proper permission for installing.

a. Use the xhost command to grant access to your display.

% xhost + your-local-machine

b. Set the DISPLAY environment variable to display to your local system.

% setenv DISPLAY your-local-machine:0.0

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:

cd java-studio-download-dir

3. Start the installer, providing an absolute path name for the state file. The format for the installer command is as follows:

where

Option

Description

-no

Prevents the installer from installing software on this host. Required to generate a state file.

-saveState

Instructs the installer to generate a state file at the location specified by statefile.

  • If you omit the statefile value, the installer writes to the default file, statefile.out in the hidden directory, .install. If you are invoking the installer from physical media, do not omit the state file name and path.
  • Note: On Windows systems you can not omit the state file name and you must specify the state file using the complete path name.

statefile

Specifies an absolute path to the generated state file.


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.

Editing the State File

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.

Editing Local Parameters

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.

 

TABLE 7-1 Editable State File Parameters

Parameter Name

Usage and default value (if any)

currentInstallDirectory

Installation directory. Default value /opt/SUNWjstudio.

CMN_HOST_NAME

hostname

CMN_DOMAIN_NAME

domainname

CMN_ADMIN_USER

Administrator User ID entered during installer session. Default=admin

CMN_ADMIN_PASSWORD

Administrator Password entered during installer session No default. Write down the password that you choose. The password can not be retrieved after installation.

CREATE_NON_ROOT_INSTANCE

Yes/No indicator. Default=No.

STUDIO_USER

Non-root user account login ID.

STUDIO_GROUP

Non-root user account group.


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:

The following procedure generates a state file ID by running the installer on the platform on which you want to perform silent installation.


procedure icon  To Generate a State File ID Using the Installer

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]

Running the Installer in Silent Mode

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.


procedure icon  To Run the Installer in Silent Mode

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.

% xhost + machine-name

b. Make sure your DISPLAY environment variable is properly set to the local display. For example, if your machine name is myhost:

% setenv DISPLAY myhost:0.0

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:

where:

Option

Description

-noconsole

Starts the installer in silent mode, suppressing the command line interface.

-nodisplay

Starts the installer in silent mode, suppressing the graphical user interface.

-state

Uses the specified statefile as input to a silent installation.

statefile

Specifies an absolute path name to a statefile.


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:

cd /var/sadm/install/logs

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:

# tail -f log-file-name


Uninstalling Software in Silent Mode

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:


procedure icon  To Generate a State File

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.

% xhost + machine-name

b. Make sure your DISPLAY environment variable is properly set to the local display.

% setenv DISPLAY machinename:0.0

2. Log in with the proper permissions

3. Change to the directory containing the uninstaller:

cd java-studio-install-dir

4. Run the uninstaller with the following command:

where:

-no

Prevents the uninstaller from removing software.

-saveState

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.

statefile

Specifies an absolute path to the generated state file.


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.


procedure icon  To Run the Uninstaller in Silent Mode

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:

where:

-noconsole

Starts the uninstaller in silent mode, suppressing the command line interface.

-nodisplay

Starts the uninstaller in silent mode, suppressing the graphical user interface.

-state

Uses the specified statefile as input to a silent uninstallation.

statefile

Specifies an absolute path name to a statefile.


While the uninstaller is running, you can monitor its progress by examining the uninstallation log.


procedure icon  To Monitor Uninstalling in Silent Mode (Solaris OS)

1. In a terminal window, change to the log file directory.

# cd /var/sadm/install/logs

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:

MM

Specifies the month

dd

Specifies the date

hh

Specifies the hour

mm

Specifies the minute


3. Use the tail command to watch messages as they are written to the logs.

For example:

# tail -f log-file-name