IBM Books

Quick Beginnings for UNIX**


Installation Steps

To install DB2 Universal Database on UNIX systems, perform the following steps:

Step 1. Identify and Record Parameter Values

Table 7 will help you determine the values required to install DB2 products, set up a DB2 instance and configure the Administration Server. Before proceeding with the installation and configuration, complete the Your Value column in the table. If you want to choose the default value for a parameter, you do not need to provide any value in the Your Value column for that parameter. In Table 7, the only parameter for which a value is required is DB2 Product Name. All other parameters either have a default value or are optional.

Table 7. Parameter Values Required for Installation
Information Required for DB2 Installer Default Value Your Value
Product/Component

DB2 Product Name1

None

DB2 Product Messages2

None

Documentation2

None
DB2 Instance

User Name

db2inst1

UID

System-generated UID

Group Name

db2iadm1

GID

System-generated GID

Password

ibmdb2

TCP/IP Service Name

db2cdb2inst1

TCP/IP Port Number

50001

IPX/SPX File Server Name

*

IPX/SPX Object Name

*

IPX/SPX Socket Number

879E

IPX/SPX NetWare User ID

None

IPX/SPX NetWare Password

None

User Name (UDF)

db2fenc1

UID (UDF)

System-generated UID

Group Name (UDF)

db2fadm1

GID (UDF)

System-generated GID

Password (UDF)

ibmdb2
Administration Server

User Name (DAS)

db2as

UID (DAS)

System-generated UID

Group Name (DAS)

db2asgrp

GID (DAS)

System-generated GID

Password (DAS)

ibmdb2

TCP/IP Port Number (DAS)

523 523

IPX/SPX File Server Name (DAS)

*

IPX/SPX Object Name (DAS)

*

IPX/SPX Socket Number (DAS)

87A2 87A2

IPX/SPX NetWare User ID (DAS)

None

IPX/SPX NetWare Password (DAS)

None

Notes:

  1. You must select at least one DB2 product to install. See Installation and Configuration Supplement for a list of DB2 products available for installation.

  2. You can optionally select one or more filesets in this product. There is a separate fileset for each locale. See Installation and Configuration Supplement for the names of filesets for DB2 Product Messages and Documentation.

Step 2. Update Kernel Configuration Parameters



Figure car not displayed.

Depending on your workstation's operating system and its kernel configuration, you may need to update the kernel configuration parameters before installing DB2:

  • For HP-UX kernel configuration parameters, see Table 8.

  • For Solaris kernel configuration parameters, see Table 9.
do not need to update the kernel configuration parameters. To continue the installation on an AIX or Linux workstation, go to Step 3. Mount the CD-ROM.

Recommended Values for HP-UX Version 10 and Version 11

The values in Table 8 are the recommended HP-UX kernel configuration parameters.

Table 8. HP-UX Kernel Configuration Parameters (Recommended Values)
Kernel Parameter Physical Memory
64MB - 128MB 128MB - 256MB 256MB+
maxuprc
maxfiles
 
nproc
nflocks
ninode
nfile
 
msgseg
msgmnb
msgmax
msgtql
msgmap
msgmni
msgssz
 
semmni
semmap
semmns
semmnu
 
shmmax
shmseg
shmmni
 

256
256
 
512
2048
512
(4 * ninode)
 
8192
65 535  (1)
65 535  (1)
256
130
128
16
 
128
130
256
256
 
67 108 864
16
300

384
256
 
768
4096
1024
(4 * ninode)
 
16 384
65 535  (1)
65 535  (1)
512
258
256
16
 
256
258
512
512
 
134 217 728  (2)
16
300

512
256
 
1024
8192
2048
(4 * ninode)
 
32 768
65 535  (1)
65 535  (1)
1024
258
256
16
 
512
514
1024
1024
 
268 435 456 (2)
16
300

Notes:

  1. Parameters msgmnb and msgmax must be set to at least 65535.

  2. Parameter shmmax should be set to 134217728 or 90% of the physical memory (in bytes), whichever is higher. For example, if you have 196 MB of physical memory in your system, set shmmax to 184 968 806 (196*0.9*1024*1024).

  3. To maintain the interdependency among kernel parameters, change parameters in the same sequence in which they appear in the preceding table.

To change a value, perform the following steps:

step  1.

Enter the sam command to start the System Administration Manager (SAM) program.

step  2.

Double-click on the Kernel Configuration icon.

step  3.

Double-click on the Configurable Parameters icon.

step  4.

Double-click on the parameter that you want to change and enter the new value in the Formula/Value field.

step  5.

Click on OK.

step  6.

Repeat these steps for all of the kernel configuration parameters that you want to change.

step  7.

When you are finished setting all of the kernel configuration parameters, select Action->Process New Kernel from the action menu bar.

The HP-UX operating system automatically reboots after you change the values for the kernel configuration parameters.



Figure car not displayed.

To continue with the installation on HP-UX systems, proceed to Step 3. Mount the CD-ROM.

Recommended Values for Solaris

The values in Table 9 are the recommended Solaris kernel configuration parameters.

Table 9. Solaris Kernel Configuration Parameters (Recommended Values)
Kernel Parameter Physical Memory
64MB - 128MB 128MB - 256MB 256MB - 512MB 512MB+
msgsys:msginfo_msgmax
msgsys:msginfo_msgmnb
msgsys:msginfo_msgmap
msgsys:msginfo_msgmni
msgsys:msginfo_msgssz
msgsys:msginfo_msgtql
msgsys:msginfo_msgseg
 
shmsys:shminfo_shmmax
shmsys:shminfo_shmseg
shmsys:shminfo_shmmni
 
semsys:seminfo_semmni
semsys:seminfo_semmap
semsys:seminfo_semmns
semsys:seminfo_semmnu
 

65 535(1)
65 535(1)
130
128
16
256
8 192
 
67 108 864
16
300
 
128
130
256
256

65535(1)
65 535(1)
258
256
16
512
16 384
 
134 217 728(2)
16
300
 
256
258
512
512

65 535(1)
65 535(1)
258
256
16
1024
32 768
 
268 435 456(2)
16
300
 
512
514
1024
1024

65 535(1)
65 535(1)
258
256
16
1024
32 768
 
536 870 912(2)
16
300
 
1024
1026
2048
2048

Notes:

  1. The msgsys:msginfo_msgmnb and msgsys:msginfo_msgmax parameters must be set to 65535 or larger.

  2. The shmsys:shminfo_shmmax parameters should be set to the suggested value in the above table, or 90% of the physical memory (in bytes), whichever is higher. For example, if you have 196 MB of physical memory in your system, set the shmsys:shminfo_shmmax parameter to 184968806 (196*0.9*1024*1024).

To set a kernel parameter, add a line at the end of the /etc/system file as follows:

   set parameter_name = value

For example, to set the value of the msgsys:msginfo_msgmax parameter, add the following line to the end of the /etc/system file:

   set msgsys:msginfo_msgmax = 65535

Sample files for updating the kernel configuration parameters are provided in the /opt/IBMdb2/V6.1/cfg directory. The names for these files are as follows:

kernel.param.64MB
for systems with 64MB-124MB of physical memory

kernel.param.128MB
for systems with 128MB-256MB of physical memory

kernel.param.256MB
for systems with 256MB-512MB of physical memory

kernel.param.512MB
for systems with 512MB-1GB of physical memory

Depending upon the amount of physical memory in your system, append the appropriate kernel configuration parameter file to the /etc/system file. If necessary, change the value of the shmsys:shminfo_shmmax parameter as described in Note 2 above.

After updating the /etc/system file, reboot the system.

Figure car not displayed.

To continue with the installation on Solaris systems, proceed to Step 3. Mount the CD-ROM.

Step 3. Mount the CD-ROM

To install your DB2 product using the DB2 Installer program, you must first mount the CD-ROM. Once you have mounted the CD-ROM, you can start the installation.

note

Go to the section that describes the mounting instructions for the DB2 server that you want to install:


Mounting on AIX Systems

To mount the CD-ROM on AIX, perform the following steps:

step  1.

Log in as a user with root authority.

step  2.

Insert the CD-ROM in the drive.

step  3.

Create a directory to mount the CD-ROM by entering the following command:

   mkdir -p /cdrom

where cdrom represents the CD-ROM mount directory.

step  4.

Allocate a CD-ROM file system by entering the following command:

   smitty storage

step  5.

Select File Systems.

step  6.

Select Add / Change / Show / Delete File Systems.

step  7.

Select CDROM File Systems.

step  8.

Select Add CDROM File System.

step  9.

Select Device Name.

Figure hint not displayed.

Device names for CD-ROM file systems must be unique. If there is a duplicate device name, you may need to delete a previously-defined CD-ROM file system or use another name for your directory.

step 10.

In the pop-up window, enter the following as mount point:

   /cdrom

step 11.

Mount the CD-ROM file system by entering the following command:

   smit mountfs

step 12.

Enter a value in the FILE SYSTEM name field. For example, the name could be /dev/cd0.

step 13.

Enter a value in the Directory over which to mount field. For example, this value could be /cdrom.

step 14.

Enter a value in the Type of Filesystem field. For example, this value could be cdrfs.

step 15.

Set the Mount as READ-ONLY system to Yes.

step 16.

Click on OK.

step 17.

Log out.



Figure car not displayed.

After mounting the CD-ROM, proceed to Step 4. Install the DB2 Products.

Mounting on HP-UX Systems

To mount the CD-ROM on HP-UX, perform the following steps:

step  1.

Log in as a user with root authority.

step  2.

Insert the CD-ROM in the drive.

step  3.

Mount it by entering the following commands:

    mkdir /cdrom
    /usr/sbin/mount /dev/dsk/c0t2d0 /cdrom

where /cdrom represents the CD-ROM mount point.

step  4.

Log out.



Figure hint not displayed.

The CD-ROM may also be mounted using the System Administration (SAM) tool. Consult your HP-UX documentation for more information about SAM.



Figure car not displayed.

After mounting the CD-ROM, proceed to Step 4. Install the DB2 Products.

Mounting on Linux Systems

To mount the CD-ROM on Linux, perform the following steps:

step  1.

Log in as a user with root authority.

step  2.

Insert the CD-ROM in the drive and mount it with a command similar to the following:

    mount -t iso9660 -o ro /dev/cdrom /cdrom    

where /cdrom is the mount point of the CD-ROM.

step  3.

Log out.



Figure car not displayed.

After mounting the CD-ROM, proceed to Step 4. Install the DB2 Products.

Mounting on Solaris Systems

To mount the CD-ROM on Solaris, perform the following steps:

step  1.

Log in as a user with root authority.

step  2.

If the Volume Manager is not running on your system, enter the following commands to mount the CD-ROM:

   mkdir -p /cdrom/unnamed_cdrom
   mount -F hsfs -o ro /dev/dsk/c0t6d0s2 /cdrom/unnamed_cdrom

where /cdrom/unnamed_cdrom represents the CD-ROM mount directory.
Note:If you are mounting the CD-ROM drive from a remote system using NFS, the CD-ROM file system on the remote machine must be exported with root access. You must also mount that file system with root access on the local machine.

If the Volume Manager (vold) is running on your system, the CD-ROM is automatically mounted as:

   /cdrom/unnamed_cdrom

step  3.

Log out.

Step 4. Install the DB2 Products

After you mount the CD-ROM file system, use the DB2 Installer program to install DB2.

Figure hint not displayed.

DB2 for UNIX Version 6 products can co-exist on the same machine with previous versions of DB2. 

To install your DB2 product, perform the following steps:

step  1.

Log in as root.

step  2.

Insert the CD-ROM into the drive.

step  3.

Change to the directory where the CD-ROM is mounted by entering the following command:

  • On AIX, HP-UX, or Linux:
       cd /cdrom
    

  • On Solaris:
       cd /cdrom/unnamed_cdrom
    

where /cdrom is the mount point of the CD-ROM drive on AIX, HP-UX, or Linux, and /cdrom/unnamed_cdrom is the mount point of the CD-ROM on Solaris.

step  4.

Enter the ./db2setup command to start the DB2 Installerprogram. The Install DB2 V6 window opens.

Figure hint not displayed.

It will take some time for the DB2 Installerprogram to start up, as it is scanning your system for information. 


Selecting installable products and components

step  5.

From the product list on the Install DB2 V6 screen, select the products that you want to install.

Press the Tab key to change the highlighted option and the Enter key to select or deselect an option.

To display the components for a DB2 product that you want to install, select Customize. To go back to a previous windows at any times, select Cancel.

Figure hint not displayed.

To refresh the current screen, press the F5 key or Ctrl+L

When you have finished selecting the DB2 product and its components, select OK to complete the installation.

For more information or assistance during the installation of any DB2 product or component, select Help.

When installation is complete, DB2 software is installed in the DB2DIR directory,

where DB2DIR = /usr/lpp/db2_06_01 on AIX


= /opt/IBMdb2/V6.1 on HP-UX, Solaris, or SGI IRIX


= /usr/IBMdb2/V6.1 on Linux


Figure hint not displayed.

You can use the DB2 Installer program to create an additional instance, create an Administration Server, or add additional products or components after your initial installation. To create or add a new instance, an Administration Server, or additional DB2 products and components, enter the following command:

On AIX
   /usr/lpp/db2_06_01/install/db2setup

On HP-UX, Solaris, or SGI IRIX
   /opt/IBMdb2/V6.1/install/db2setup

On Linux
   /usr/IBMdb2/V6.1/install/db2setup

Verifying the Installation

If you did not install the DB2 tools, you can verify the installation by creating the SAMPLE database and connecting to it using the command line processor as follows:

step  1.

Log on to the system as a user with system administrative (SYSADM) authority.

step  2.

Enter the db2sampl command to create the SAMPLE database.

The SAMPLE database is automatically catalogued with the database alias SAMPLE when it is created.

step  3.

Start the database manager by entering the db2start command.

step  4.

Enter the following commands to connect to the SAMPLE database, retrieve a list of all the employees that work in department 20, and reset the database connection:

   db2 connect to sample
   db2 "select * from staff where dept = 20"
   db2 connect reset

For information about entering DB2 commands, see Entering Commands Using the Command Center or Entering Commands Using the Command Line Processor.

Figure hint not displayed.

After you have verified the installation, you can remove the SAMPLE database to free up disk space. Enter the db2 drop database sample command to drop the SAMPLE database.

Software Registration

DB2 software registration is handled automatically if you installed your DB2 product from a CD-ROM using the DB2 Installer program. If you installed DB2 using your UNIX operating system's native installation tools, you must use the db2licm command to register DB2. Refer to the Command Reference for more information.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]