DB2 10.5 for Linux, UNIX, and Windows

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.

Procedure

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
    where
    • 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.