Embedding the Db2 installation image (Linux and UNIX)

On Linux® and UNIX operating systems, you can embed a Db2 installation image into the installation image of your own application. When installing a Db2 product using a response file with the interactive keyword specified, installation-related information such as progress or prompts is provided in a format easily parsed by your application.


To bundle a Db2 installation image in your own application:

  1. Copy the Db2 sample program, located in db2/samples/, to a working directory.
    Sample programs are provided in both C and Java™. The C and Java subdirectories contain a sample program and a readme file.
  2. Build the sample program using the makefile provided or a compatible compiler.
  3. Modify the response file to specify the keyword INTERACTIVE=MACHINE.
  4. Using the sample program, start the Db2 installation from your working directory.
    • In a C-based installation application, enter:
      ./InstallTester image -r response_file
    • In a Java based installation application, enter:
       java InstallTester image -r response_file
    • image represents the location of the Db2 installable image where either the db2setup command or the db2_install command is located
    • response_file specifies the full path and file name of the response file to use.