3.4. Silent Install Using a Response FileWhen you need to install DB2 on a number of computers, you may want to install it using a response file to reduce the amount of work involved. With a response file, you can install DB2 unattended, which is why it is called Silent install. This installation method is available on all supported platforms. A response file is a text file with the extension .rsp. It specifies configuration and setup parameters such as the destination directory (Windows only) and the products and components to install. It can also be used to:
Figure 3.21 shows a response file, db2ese.rsp, which can be used to perform a DB2 ESE server installation on Windows. Figure 3.21. A response file (created by the DB2 Setup Wizard)As shown in Figure 3.21, a response file consists of keywords and their values. For example, the PROD keyword specifies the DB2 product you are installing. The FILE keyword specifies the install location, and the INSTALL_TYPE keyword specifies whether to perform a TYPICAL install, a COMPACT install, or a CUSTOM install. These are the values you would have to enter interactively if you were installing DB2 using the DB2 Setup Wizard. 3.4.1. Creating a Response FileThere are three ways to create a response file for your installation.
3.4.1.1 Creating a Response File Using the DB2 Setup WizardIf you use the DB2 Setup Wizard to install DB2, you have the option to create a response file (refer back to step 3). This response file will record all the parameters you input to the DB2 Setup Wizard, and you can use this file to perform installation on other computers. The DB2 Setup Wizard created the response file shown in Figure 3.21. 3.4.1.2 Creating a Custom Response File Using a Sample Response FileYou can manually edit the response file created by the DB2 Setup Wizard or the sample response files provided on the DB2 CD-ROM. Each DB2 product has sample response files. They are located at the cd-rom/db2/platform/samples directory (where cd-rom represents the location of the installable version of DB2). Figure 3.22 shows a sample Windows response file. Figure 3.22. A sample Windows response fileAll the entries in the sample response files are commented out with asterisks (*). You need to remove the asterisks to activate the entries. The possible values are listed to the right of the equal sign. 3.4.1.3 Creating a Response File Using the Response File Generator (Windows Only)The response file generator utility, db2rspgn, creates a response file from an existing installed and configured DB2 product. The syntax for db2rspgn is: db2rspgn d x:\path [-i instance] [noctlsrv] [-nodlfm] where:
For example, db2rspgn d:\temp will generate two files in the d:\temp directory. One is the response file, db2ese.rsp (assuming DB2 UDB ESE is the product installed), and the other file is DB2.INS, which contains information such as the registry variables and database manager configurations. 3.4.2. Installing DB2 Using a Response File on WindowsTo perform a DB2 installation using a response file, use the setup command. cd-rom/setup [/L log_file] /U response_file [/T trace_file] [/F] where:
For example: setup /U d:\temp\db2ese.rsp 3.4.3. Installing DB2 Using a Response File on Linux/UNIXTo perform a DB2 installation using a response on Linux/UNIX, use the db2setup command: cd-rom/db2setup -r response_file where:
For example: db2setup r /usr/tmp/db2ese.rsp |