Installing Db2 as root

Db2® is a requirement of Predictive Insights.

About this task

Note: Before you install Db2 as root, ensure that the Db2 user is created as described in the Creating users to install Predictive Insights documentation, https://www.ibm.com/docs/en/oapi/1.3.6?topic=install-creating-users-predictive-insights.

Db2 can be installed as root. The ongoing management of Db2 is done as the Db2 instance owner. Typically, the Db2 instance owner is db2inst1.

Procedure

  1. Copy the Db2 installation software to the directory in which you want to extract it.
  2. Extract the Db2 installation software.

    For example:

    tar zxf Db2S_11.5.4_MPML.tar.gz
  3. Change to the server_r directory and run the Db2 prerequisites checker script.

    For example:

    ./db2prereqcheck -v 11.5.4.0
    

    You can ignore alerts in relation to the following:

    • /lib/libpam.so*
    • rdma
    • InfiniBand
    • modprobe.conf
  4. Install any packages that are called out as problems by the db2prereqcheck script.

    For example:

    yum install dapl
    yum install sg3_utils
    
  5. Check if SELINUX is enabled, and if so disable it.

    For example:

    vi /etc/selinux/config
    SELINUX=disabled
    
  6. Restart if the SELINUX setting was changed.
  7. Modify the kernel parameters as described in the Db2 documentation, https://www.ibm.com/docs/en/db2/11.5
  8. Change to the directory that contains the installation software.

    For example:

    cd /home/db2inst1/server_r
    
  9. Run the db2setup script:
    ./db2setup
    
    Note: This command opens the Db2 installation wizard and therefore must be run from a suitable XTERM or VNC window.
  10. Click Install a product from the set of options displayed.
  11. Select New Install and then Db2 11.5.4.0 Server Editions. Choose the location to install to, for example /opt/ibm/db2/V11.5.
  12. Select the Typical installation.
  13. Select the Create an instance checkbox.
  14. In the Instance Owner page, enter the details such as the User name, Group name, Password, and the Home directory. Click Next.
  15. In the Fenced User page, enter the details such as the User name, Group name, Password, and the Home directory.
  16. Review the terms and when ready, select the I agree to the IBM terms checkbox and click Next.
  17. Click Finish to begin the installation.
  18. When the Installation successfully completes, click Finish.
    Note: To run the following command, you must switch to the db2 instance. Check the current license with db2licm -l. For example:
    Product name:       "Db2 Community Edition"
    License type:                     "Community"
    Expiry date:                      "Permanent"
    Product identifier:               "db2dec"
    Version information:              "11.5"
    Max amount of memory (GB):        "16"
    Max number of cores:              "4"
  19. Download the license file db2std_vpc.lic. For example:
    IBM Db2 Standard Edition VPC Option Activation V11.5.4 for Linux UNIX and Windows Multilingual (CC6L7ML)
  20. Apply the downloaded license by running the following command, where db2std_vpc.lic is the license file name.
    db2licm -a /path/to/license_std_vpc/db2/license/db2std_vpc.lic
    and remove the "Db2 Community Edition" license by running the command:
    db2licm -r "db2dec"
    So that the license shows:
    Product name:            "Db2 Standard Edition"
    License type:                     "Virtual Processor Core"
    Expiry date:                      "Permanent"
    Product identifier:               "db2std"
    Version information:              "11.5"
    Max amount of memory (GB):        "128"
    Max number of cores:              "16"
    Enforcement policy:               "Hard Stop"
    Features:
    IBM Db2 Performance Management Offering:     "Not licensed"