IBM WebSphere Application Server 8.0 Administration Guide
上QQ阅读APP看书,第一时间看更新

Silent installation

So far, we have covered using the GUI approach to install WAS. The IIM installation process can also be run silently in headless mode. By using special response files, we can preset installation settings which do not require any user input.

Using response files is the technique used in automatic installations where servers are built to a known standard and naming convention. This ensures that each new WAS is installed exactly the same way each time. This is critical for production environments to ensure each server is configured the same way. This lends to easier support and fewer errors are introduced into environments, which is a key factor in supporting production systems. Another vital reason to use silent installations is that some organizations do not install X11 on production servers for security reasons.

Installing packages silently using Installation Manager

To install product packages silently using the Installation Manager, you must first create a response file. A response file can contain many different settings and they can often change as product packages are updated, and so being able to get a list for all available settings along with the correct syntax can be difficult and time consuming. To solve this problem, IBM has added a feature to the IIM to record installations, as such automatically creating a response file with the correct settings. You can then use a record response file with the silent command-line option and install WAS in an automated non-GUI fashion.

Recording a response file

You can use the IBM Installation Manager to record installation actions into a response file. When you record a response file, the selections that you make in Installation Manager are stored in an XML file. When you use the recording option of IIM, you do not actually install WAS, you are just recording a set of instructions that will be used to generate a response file. The resulting response file can be used in silent mode, instructing IIM to use the data in the XML response file to install packages without user intervention.

Note

You cannot record a response file to install Installation Manager. To install both Installation Manager and an IBM product, you must modify a response file to add the commands to install IIM; however, it is beyond the scope of this book.

Command-line options for recording

There are three important command-line options which can be used to instruct IIM to record a response file:

  • responseFile
    • The<responseFile> is a file path and filename of the response XML-based file you want to generate. The response file is used in a silent installation.
  • -skipInstall
    • The -skipInstall argument requires that the<agentDataLocation> is a directory that you can write to.
  • agentDataLocation
    • The<agentDataLocation> is a folder where you want IIM to store the recorded installation data. You can use the same<agentDataLocation> in another subsequent recording session to record updates or modifications to the IBM product. These changes are recorded in the<agentDataLocation> directory. For more information about the -skipInstall argument, see Installation Manager help and look up command-line arguments.

Running a recording

Use the following steps to instruct the IIM to record a GUI installation into an XML response file:

  1. On a command line, change to the eclipse subdirectory in the<iim_root> directory where you installed Installation Manager earlier in the chapter. Run the following command:
    • For Linux:

      cd <iim_root>/eclipse

    • For Windows:

      cd <iim_root>\eclipse

  2. Run the following command to record a response file for the IBM product installation. This command uses the -skipInstall <agentDataLocation> argument, which records the installation commands without installing the IBM product. Substitute your own filename and location for the response file. Verify that the file paths that you enter exist. Installation Manager does not create directories for the response file.

    Note

    Using the -log option is not supported when recording a response file.

    • For Linux:

      ./IBMIM -record /var/tmp/was8_install.xml -skipInstall /var/tmp/was8

    • For Windows:

      ./IBMIM -record c:\temp\was8_install.xml -skipInstall c:\temp\was8

      Note

      On Windows, use IBMIM.exe for installations that are not silent and when recording a response file. The IBMIM.exe command is not supported for silent installations. Use IBMIMc.exe for silent installations.

      Do not use the command IBMIMc on Linux and UNIX operating systems.

  3. Follow the on-screen instructions as required by the IIM wizard. You will need to set the repository location again. You can set the location of the repository in the repository table. To access the repository table, click File | Preferences... | Repositories. The text (Recording...) is displayed in the IIM title bar when you are recording a response file.
  4. Click Finish, and then close Installation Manager to finish the recording of the response file.

    The result of running the command will be an XML response file, which is created and saved in the location that you specified in the command-line options outlined previously.

Installing in silent mode using a response file

Now we have a response file prepared, we can run a silent install. Before we do so, we need to cover the IIM command-line options available to the recording process.

Command-line options for installing

To run IIM in record mode, there are several command-line parameters which can be used to instruct IIM to silently install using a response file:

  • --launcher.ini: Indicates that an install preferences ini-file is being used to set IIM settings. Settings which can be included here are JVM to use, JVM memory size, no splash screen, and so on. You can read the IIM help to learn more about ini-file settings.
  • <silent-install.ini>: The filename and file path to the install ini-file you have configured. There is a sample file called silent-install.ini located in the<iim_root/eclipse> folder.
  • -input: The input option is used when a response file is being used.
  • <responseFile>: The actual filename and file path of the XML response file to use in the silent install.
  • -log: Specifies that a log file should be generated containing information about the installation and installation results.
  • <logFile>: The actual filename and file path of the log file that will be generated.

Running the silent install

To run IIM in silent mode, run the following command from the eclipse subdirectory in the directory where you installed Installation Manager, that is,<iim_root>/eclipse.

  1. For Linux:

    ./IBMIM --launcher.ini silent-install.ini -input /var/tmp/was8_install.xml -log /var/tmp/was8/silent_install_log.xml

  2. For Windows:

    IBMIMc.exe --launcher.ini silent-install.ini -input c:\ temp\was8_install.xml l -log c:\temp\was8\silent_install_log.xml

When the installation is successful, it returns a status of 0. An unsuccessful operation returns a non-zero number.

When the Installation Manager installer is run, it reads the response file and (optionally) writes a log file to the directory specified. If you specified a log file and directory, the log file is empty when the operation is successful. The log file contains error elements if the operation was not completed successfully.