Create a Single Server DPF Instance
This document lists the basic commands or steps to create a Single host DPF instance. Multiple physical server DPF instance can be created in similar way with few additional steps.
Step 1 : DB2 Installation (to be done as root)
- Untar the gzip file, depending on your OS version.
- tar -zxvf <filename>.gz (for Linux)
- gunzip -c <filename>.gz | tar -xvf - (for AIX)
- This will create a folder named "server_t" (v10.5 onwards)
- As root, use the script "db2_install" inside the server_t folder. You can also use "installfixpack" script.
- Follow on screen prompts to complete installation. You can use the default path or provide a different one for the install.
- Verify the installation using "db2ls" command (/opt/IBM/db2/V11.1/install/db2ls)
Step 2 : Apply DB2 License
- Change directory to the DB2 install path (cd /opt/IBM/db2/V11.1/adm)
- Apply the license using the "db2licm" script (./db2licm -a /tmp/db2aese_c.lic)
- Verify the license using the "db2licm -l" script (./db2licm -l)
The following steps are important for the instance creation
Step 3 : Create Partitioned Instance
- The same number of consecutive ports must be free on each host that is to participate in the DPF environment.
- During instance creation, the number of ports equal to the number of logical partitions on the current server will be reserved in the /etc/services.
- These ports will be used by the Fast Communication Manager. The reserved ports will be in the following format (assuming 5 logical nodes).
DB2_<instancename>
DB2_<instancename>_1
DB2_<instancename>_2
DB2_<instancename>_3
DB2_<instancename>_END
- The only mandatory entries are the beginning (DB2_<instancename>) and ending (DB2_<instancename>_END)
- Add entries to db2nodes.cfg (found at $HOME/sqllib) file:
0 <hostname> 0
1 <hostname> 1
2 <hostname> 2
3 <hostname> 3
4 <hostname> 4
- Create the .rhosts files under instance home directory. This will be a hidden file
<hostname> <instance>
- Make sure passwordless-SSH keys are setup correctly for the instance ID for proper FCM communication.
- Even though it’s a single server instance, still password-less SSH is required to be created so that the instance can talk to other logical nodes without requiring its password i.e. as instance you should be able to run <instance>@<hostname> without having to enter the instance password. Click here for how to setup passwordless-SSH
- Set the DB2RSHCMD parameter value. This is important to make the SSH work. Else there will be internal communication errors received.
db2set DB2RSHCMD=/usr/bin/ssh
- Check if SSH is working correctly using any of the below commands. It should return an OK value else will give timeout or unable to ping host errors:
db2_all date
db2_all "echo OK"
- Once all the above has been done you can start the instance successfully. In case of any issues check if the entries in /etc/hosts are correctly entered.