Creating users to install Predictive Insights

Create users to install Predictive Insights and its prerequisites.

About this task

If you install Predictive Insights on a single server, you can use a single or multiple user accounts to install the system requirements and the Predictive Insights components. The following instructions use three accounts:

  • db2inst1 to install and administer Db2.
  • scadmin to install the other system requirements and Predictive Insights.
  • restadmin to install and administer some REST Mediation components, if REST Mediation will be used.

Create the db2inst1 user on the server on which you plan to install Db2. Create the scadmin user on all servers on which you plan to install Predictive Insights components.

Procedure

  1. To create the scadmin user account, log in as root and enter the following commands:
    groupadd scadmin
    useradd -g scadmin -d /home/scadmin -s /bin/bash scadmin
    passwd scadmin
    
  2. To create the restadmin user account, log in as root and enter the following commands:
    groupadd restadmin
    useradd -g restadmin -d /home/restadmin -s /bin/bash restadmin
    passwd restadmin
    
    Note: restadmin is used where components that use Java 11 are on the same server as components that use Java 8, to avoid confusion.
    From iFix 4 onwards, Java 11 is required on any server that runs any of the following components:
    • Kafka and the associated Zookeeper
    • Spark
    • REST Mediation service
    • Cassandra
  3. As user root on the database server, create an OS user within the relevant group.
    groupadd db2iadm1
    useradd -g db2iadm1 -d /home/db2inst1 -s /bin/bash db2inst1
    passwd db2inst1
  4. As root user on the database server, add the existing scadmin user to the same primary group as the Db2® instance owner, by default this user is db2inst1.

    For example, add the user scadmin to the group db2iadm1.

    usermod -G scadmin,db2iadm1 scadmin
  5. Switch user to scadmin as shown in the following command:
    su - scadmin
  6. Add the following source command into the ~scadmin/.bashrc file:
    if [ -f /home/db2inst1/sqllib/db2profile ]; then
    . /home/db2inst1/sqllib/db2profile
    fi

    The commands assume that:

    • db2inst1 is the Db2 instance owner.
    • /home/db2inst1 is the home area of the Db2 instance owner
    • Db2 is installed in the /home/db2inst1/sqllib directory
  7. Source ~/.bashrc file by running the following command:
    source ~/.bashrc file