Creating non-root thin server instances (Linux and AIX)
You can create non-root thin server instances locally on a code server and on a remote server in a thin server instance environment.
Before you begin
- Ensure that you understand the limitations of non-root Db2® installations. For more information, see Limitations of non-root installations
Procedure
To create non-root thin server instances:
- Set up a thin server instance environment on the code server as a non-root user. For example, db2inst1. For more information, see Setting up a thin server instance environment (Linux and AIX).
- Create non-root thin server instances by performing one
of the following set of substeps:
- To create another non-root thin server instance locally on
the code server, perform the following substeps:
- Log in to the code server as another non-root thin server instance user. For example, db2inst2.
- Access the read-only copy of the Db2 installation path that is exported from the code server. For example, /home/db2inst1/sqllib, where db2inst1 is the non-root user who owns the Db2 installation on the code server, and /home/db2inst1 is the home directory of the non-root instance owner.
- Set the library path in one of the following ways:
- On Linux® operating systems, issue
the following command:
export LD_LIBRARY_PATH=/home/db2inst1/sqllib/lib/:/home/db2inst1/sqllib/instance/native/install:$LD_LIBRARY_PATH
- On AIX® operating systems, issue the following
command:
where, /home/db2inst1/sqllib is the read-only copy of the Db2 installation path that is exported from the code server.LIBPATH=/home/db2inst1/sqllib/lib/:/home/db2inst1/sqllib/instance/native/install:$LIBPATH export LIBPATH
- On Linux® operating systems, issue
the following command:
- Change directory to the instance directory:
cd /home/db2inst1/sqllib/instance
- Run the db2icrt command:
./db2icrt
- To enable root-based features for the non-root thin server instance
on code server, perform the following substeps:
- Log in to the code server as a root user.
- Copy the following configuration file to /tmp or
another local directory.
/home/db2inst1/sqllib/instance/db2rfe.cfg
- Edit the copied db2rfe.cfg configuration
file to update the SVCENAME and SET_ULIMIT parameters.
This configuration file is input to the db2rfe command.
The following parameters are available in thedb2rfe.cfg file:
INSTANCENAME SET_ULIMIT (* AIX only) ENABLE_OS_AUTHENTICATION RESERVE_REMOTE_CONNECTION SVCENAME SVCEPORT RESERVE_TEXT_SEARCH_CONNECTION SVCENAME_TEXT_SEARCH SVCEPORT_TEXT_SEARCH
- Export the local directory by issuing the following command:
where /home/db2inst2 is the home directory of the user db2inst2 who owns the local instance on the code server.DB2LOCAL=/home/db2inst2/sqllib export DB2LOCAL
- Issue the db2rfe command as shown, specifying
the copied db2rfe.cfg file:
./db2rfe -f /tmp/db2rfe.cfg
- To create a non-root thin server instance on the remote server, perform
the following substeps:
- As a root user, mount the thin server instance on the remote server as a read-only file system. For more information, see Mounting a thin server instance (Linux and AIX).
- Log in to the remote server as a non-root instance owner. For example, db2inst3
- Set the library path in one of the following ways:
- On Linux operating systems, issue
the following command:
export LD_LIBRARY_PATH=/home/db2inst1/sqllib/lib/:/home/db2inst1/sqllib/instance/native/install:$LD_LIBRARY_PATH
- On AIX operating systems, issue the following
command:
where, /home/db2inst1/sqllib is the read-only copy of the Db2 installation path that is exported from the code server.LIBPATH=/home/db2inst1/sqllib/lib/:/home/db2inst1/sqllib/instance/native/install:$LIBPATH export LIBPATH
- On Linux operating systems, issue
the following command:
- Change directory to the instance directory:
cd /home/db2inst1/sqllib/instance
- Run the db2icrt command:
./db2icrt
- To enable root-based features for the non-root thin server instances
on remote server, perform the following substeps:
- Log in to the remote server as a root user.
- Copy the following configuration files to /tmp or
another local directory:
- /home/db2inst1/sqllib/instance/db2rfe
- /home/db2inst1/sqllib/instance/db2rfe.cfg
- Edit the copied db2rfe.cfg configuration
file to update the SVCENAME and SET_ULIMIT parameters.
This configuration file is input to the db2rfe command.
The following parameters are available in thedb2rfe.cfg file:
INSTANCENAME SET_ULIMIT (* AIX only) ENABLE_OS_AUTHENTICATION RESERVE_REMOTE_CONNECTION SVCENAME SVCEPORT RESERVE_TEXT_SEARCH_CONNECTION SVCENAME_TEXT_SEARCH SVCEPORT_TEXT_SEARCH
- Export the local directory by issuing the following commands:
where,/home/db2inst3 is the home directory of the user db2inst3 who owns the local instance on the remote server.DB2LOCAL=/home/db2inst3/sqllib export DB2LOCAL
- Issue the db2rfe command as shown, specifying
the copied db2rfe.cfg file:
./db2rfe -f /tmp/db2rfe.cfg
- To create another non-root thin server instance locally on
the code server, perform the following substeps: