Section 3.4. Silent Install Using a Response File


3.4. Silent Install Using a Response File

When 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:

  • Create instances

  • Set up global DB2 registry variables

  • Set up the database manager configuration

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 File

There are three ways to create a response file for your installation.

  • Using the DB2 Setup Wizard to save the setup and configuration data.

  • Modifying a sample response file to create a custom response file.

  • Using the response file generator (Windows only).

3.4.1.1 Creating a Response File Using the DB2 Setup Wizard

If 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 File

You 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 file


All 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:

-d specifies the directory for a response file and any instance files. This parameter is required.

x represents the disk drive.

-i (optional) specifies a list of instances for which you want to create a profile. The default is to generate an instance profile file for all instances.

-noctlsrv (optional) indicates that an instance profile file will not be generated for the Control Server instance.

-nodlfm (optional) indicates that an instance profile file will not be generated for the Data Links File Manager instance.

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 Windows

To 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:

cd-rom represents the location of the DB2 installable image.

/L (optional) specifies the fully qualified log file name, where setup information and any errors occurring during setup are logged. If you do not specify the log file's name, DB2 names it db2.log and puts it in the My Documents/db2log folder.

/U specifies the full path name of the response file.

/T (optional) specifies the full path name of a file to trace install information.

/F (optional) forces all DB2 processes before installation. If any DB2 processes are running when the DB2 setup command is issued, the installation of DB2 cannot occur. Use this option to stop all DB2 processes so installation can be started.

For example:

 setup /U d:\temp\db2ese.rsp 

3.4.3. Installing DB2 Using a Response File on Linux/UNIX

To perform a DB2 installation using a response on Linux/UNIX, use the db2setup command:

 cd-rom/db2setup -r response_file 

where:

cd-rom represents the location of the DB2 install image.

response_file represents the full path name of the response file.

For example:

 db2setup r /usr/tmp/db2ese.rsp 



Understanding DB2(R. Learning Visually with Examples)
Understanding DB2: Learning Visually with Examples (2nd Edition)
ISBN: 0131580183
EAN: 2147483647
Year: 2004
Pages: 313

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net