This section tells you how to install your DB2 product using the DB2 Installer program or manually, using your operating system's native installation tools.
To install DB2 Connect on Linux systems, perform the following steps:
Table 4 will help you determine the values required to install
DB2 products and set up a DB2 instance. 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 4, the only parameter for which a value is required is DB2
Product Name, which you select after you start the DB2 Installer
program. All other parameters either have a default value or are
optional.
Table 4. Parameter Values Required for Installation
Information Required for DB2 Installer | Default Value | Your Value |
---|---|---|
Product/Component | ||
DB2 Product Name
| None |
|
DB2 Product Messages
| None |
|
Documentation
| None |
|
DB2 Instance | ||
User Name
| db2inst1 |
|
UID
| System-generated UID |
|
Group Name
| db2iadm1 |
|
GID
| System-generated GID |
|
Password
| ibmdb2 |
|
To install your DB2 product, you must first mount the CD-ROM. Once you have mounted the CD-ROM, you can start the installation.
To mount the CD-ROM on a Linux workstation, perform the following steps:
Step 1. | Log on to the system 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 represents the mount point of the CD-ROM. |
Step 3. | Log out.
|
This step tells you how to install your DB2 product using the DB2 Installer program, or your operating system's native installation tools.
Sometimes, display problems can occur when running the DB2 Installer
program. To refresh the current screen at any time, press
Ctrl+L. To avoid most potential display problems, install
your DB2 product through a virtual console session (a terminal window outside
of the graphical interface that most Linux distributions are installed
with). To change to a virtual console session, press
Ctrl+Alt+F1. To change back to the graphical interface,
press Ctrl+Alt+F7 (your particular Linux distribution may differ,
refer to your Linux documentation for more information).
|
When you use the DB2 Installer program, you should be aware of the following:
|
After you mount the CD-ROM, use the DB2 Installer program to install your DB2 product..
To install your DB2 product, perform the following steps:
Step 1. | Log on to the system as a user with root authority. | ||
Step 2. | Change to the directory where the CD-ROM is mounted by entering the following command: cd /cdrom where /cdrom represents mount point of the CD-ROM. | ||
Step 3. | Enter the ./db2setup command to start the DB2 Installer
program. The Install DB2 V7 window opens.
| ||
From the product list on the Install DB2 V7 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 window at any times, select Cancel. 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 the installation is complete, Any DB2 software is installed in the
/usr/IBMdb2/V7.1 directory. If you are migrating your
DB2 product, you may have to perform some tasks to complete the migration
process. For more information, see DB2 Connect Post-Installation Migration Tasks.
|
You can use the DB2 Installer program to 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: /usr/IBMdb2/V7.1/install/db2setup |
We recommend that you use the DB2 Installer program to install a DB2 product on Linux. The DB2 Installer program is a text-based installation tool that automates the installation and configuration of any DB2 products. If you prefer not to use this utility, you can install a DB2 product manually using the db2_install or rpm commands.
Your DB2 product is made up of different functions and components that are referred to as packages in the Linux environment. When you install your DB2 product using the rpm command, you must select to install each package that you require and each associated package for the optional functions that you want to use. Some packages are required and some are optional. For a list of all the required and optional packages for a DB2 product installation, see Appendix A, Contents of the DB2 Products for Linux.
For example, if you want to install the Control Center on your Linux workstation, you would need to install the db2wcc71-7.1.0-0.i386.rpm package by entering the following command:
rpm -ivh db2wcc71-7.1.0-0.i386.rpm
Using the rpm command to install a DB2 product is prone to errors because you could easily skip over a required package. We recommend that you use the db2_install script to install a DB2 product if you do not want to use the DB2 Installer program. The db2_install script will install both the required and optional packages for a DB2 product using the rpm command.
To install a DB2 product using the db2_install script:
Specify one or more of the following keywords, separated by spaces, to install DB2 products. DB2.CPER - DB2 Connect Personal Edition DB2.SDK - DB2 Application Development Client DB2.CAE - DB2 Administration Client Enter "help" to redisplay the product names, enter "quit" to exit. ******************************************************************
When installation is complete your DB2 software will be installed in the /usr/IBMdb2/V7.1 directory.
After manually installing your product, you should create groups and user IDs for the instance owner, Administration Server, and fenced user defined functions (UDFs) and stored procedures. Once you set up these IDs you can create an instance, create the Administration Server, install the license key, and create links for your DB2 product files.
You do not have to perform these tasks if you used the DB2 Installer program to install your DB2 product.
You should create group and user IDs for the instance owner, Administration Server, and UDFs and stored procedures. If you want to use existing user or group IDs, you can skip this section and proceed to creating an instance.
In addition to the rules imposed by the operating system for user names and groups, you must also adhere to the rules described in Appendix D, Naming Rules.
To create a group and user ID for the instance owner:
groupadd -g 999 dbadmin1
where 999 represents the group ID and dbadmin1 represents the group name. This new group is the SYSADM group for the instance.
useradd -u 1004 -g dbadmin1 -m -d /home/db2inst1 db2inst1 -p db2inst1
where 1004 represents the user ID, dbadmin1 represents the group you created in the previous step, /home/db2inst1 represents the user's home directory, and db2inst1 represents the username and instance name.
You should use a unique user ID for each instance you create. This allows for easier error recovery if a system error occurs.
To create group and user IDs for the Administration Server follow the same steps you used to create IDs for the instance owner. You must use different user IDs for the Administration Server and instance owner. For security reasons, we recommend you use a different group ID for the Administration Server and instance owner.
To create group and user IDs for UDFs and stored procedures, follow the same steps you used to create IDs for the instance owner. For security reasons, we recommend that you use different user IDs for UDFs and the instance owner. You will be asked to supply a UDF user ID when you create a DB2 instance.
A DB2 instance is an environment where you store data and run applications. Use the db2icrt command to create an instance. You must have root authority to enter this command. For more information about database instances, refer Administration Guide.
The db2icrt command is run with the following parameters:
/usr/IBMdb2/V7.1/instance/db2icrt -a AuthType -u FencedID InstName
where:
You must configure each instance to accept inbound communications. For more information, refer to the Installation and Configuration Supplement.
The Administration Server provides services to support tools that automate the configuration of connections to DB2 databases. The Administration Server also supports tools that administer DB2 from your server system or a remote client using the Command Center.
To create the Administration Server, use the /usr/IBMdb2/V7.1/instance/dasicrt ASName command, where ASName represents the name of the Administration Server you want to create.
For more information on the Administration Server, refer to the Administration Guide.
After you have created the Administration Server, you must configure it to accept inbound connections. For more information, refer to the Installation and Configuration Supplement.
Your Proof of Entitlement and the License Information booklet identify the products for which you are licensed.
To update your DB2 product's license key:
/usr/IBMdb2/V7.1/adm/db2licm -a filename
where filename is the full pathname and filename for the license file that corresponds to the product you have purchased.
The name of the license file for this product is:
For example, if the CD-ROM is mounted on /cdrom and the name of the license file is db2conpe.lic, the command should be entered as follows:
/usr/IBMdb2/V7.1/adm/db2licm -a /cdrom/db2/license/db2conpe.lic
To create links in the /usr/lib and the /usr/include directories to DB2 files, log in as a user with root authority and run the /usr/IBMdb2/V7.1/cfg/db2ln command.
If there are existing links to the /usr/lib and /usr/include directories from previous versions of a DB2 product, they will automatically be removed by entering the db2ln command to create links for this version. If you want to re-establish the links to the libraries of previous versions of your DB2 product, then you must execute the db2rmln command from your previous version of your DB2 product before you execute the db2ln command on previous version of your DB2 product. Links can be established for only one version of a DB2 product on a given system.
If you are migrating from a previous version of a DB2 product, you now need to migrate any instances that you want to use with this version of the DB2 product that you installed. For more information, see DB2 Connect Post-Installation Migration Tasks.