We recommend that you use the db2setup utility to install DB2 Connect for AIX. If you prefer not to use this utility, you can install DB2 Connect manually using AIX's System Management Interface Tool (SMIT).
With SMIT, you can install a software bundle or you can install subset of DB2 products and filesets. Installing DB2 Connect using the software bundle feature is easier than installing individual filesets because selecting a single bundle eliminates the need to select all of the required filesets from a long list.
To install DB2 Connect using the SMIT software bundle feature:
Repeat the steps in this section if you want to install software bundles on other machines.
Note: | When you install DB2 Connect using the software bundle feature, the DB2 Product Library (HTML) filesets are not automatically installed. Also, the DB2 Product Messages, other than in English, are not installed. You must install these filesets separately using the following method. |
To install a subset of DB2 products or filesets using SMIT:
For example, if /cdrom is the CD-ROM mount directory, enter /cdrom/db2 as the INPUT device.
Repeat the steps in this section if you want to install subsets of DB2 products or filesets on other machines.
If you installed a DB2 Product Library (HTML) fileset, you must run the /usr/lpp/db2_07_01/doc/db2insthtml locale command to uncompress and untar the HTML documentation, where locale represents the language identifier of the installed fileset. If you installed any non-English DB2 Product Library filesets, run this command for the English fileset first, then re-run this command for every installed non-English fileset locale.
To recover disk space, you may want to remove the compressed tar files and product library filesets after installation. You will still be able to view the HTML books after the compressed tar files and filesets have been removed.
After manually installing your DB2 product, you should create a group 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 files.
Note: | You do not have to perform these tasks if you used the db2setup utility to install DB2. |
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:
mkgroup id=999 dbadmin1
where 999 represents the group ID and dbadmin1 represents the group name. This new group is the SYSADM group for the instance.
mkuser id=1004 pgrp=dbadmin1 groups=dbadmin1 home=/home/db2inst1 db2inst1 passwd 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 in which 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 to the Administration Guide.
The db2icrt command is run with the following parameters:
DB2DIR/instance/db2icrt -a AuthType -u FencedID InstName
where:
| where DB2DIR | = /usr/lpp/db2_07_01 on AIX | |
|
| = /opt/IBMdb2/V7.1 HP-UX, PTX, SGI IRIX, or Solaris | |
|
| = /usr/IBMdb2/V7.1 on Linux |
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 Control Center. For more information on the Administration Server, refer to the Administration Guide.
To create the Administration Server use the DB2DIR/instance/dasicrt
ASName command
| where DB2DIR | = /usr/lpp/db2_07_01 on AIX | |
|
| = /opt/IBMdb2/V7.1 HP-UX, PTX, SGI IRIX, or Solaris | |
|
| = /usr/IBMdb2/V7.1 on Linux |
and ASName represents the name of the Administration Server you want to create.
Your Proof of Entitlement and the License Information booklet identify the products for which you are licensed.
To update your DB2 product license key:
/usr/lpp/db2_07_01/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 DB2 product license key is added to the /var/ifor/nodelock file.
The names of the license files for these products are:
For example, if the CD-ROM is mounted in the /cdrom directory and the name of the license file is db2dlm.lic, the command should be as follows:
/usr/lpp/db2_07_01/adm/db2licm -a /cdrom/db2/license/db2dlm.lic
You can create links for the DB2 files to the /usr/lib directory, and for the include files to the /usr/include directory for a particular version and release level of the product.
You may want to create these links if you are developing or running applications and want to avoid having to specify the full path to the product libraries and include files.
To create links for DB2 files, log in as a user with root authority and run the /usr/lpp/db2_07_01/cfg/db2ln command.
If there are existing links to the /usr/lib and /usr/include directories from previous versions of DB2, they will automatically be removed by entering the db2ln command to create links for this version of DB2. If you want to re-establish the links to the libraries of previous versions, then you must execute the db2rmln command from your previous version of DB2 before you execute the db2ln command from the previous versions of DB2. Links can be established for only one version of DB2 on a given system.