Understanding the DPK Setup Script prereq Step
Before a non-root user runs a mid-tier deployment, the root user must run the DPK setup script with the --prereq option. The script performs validations and sets up a default central inventory location with the correct permissions if none exists.
Note:
If you are performing the entire DPK deployment as the root
user, you do not need to run the DPK setup script with the --prereq option first.
-
If oraInst.loc exists (/etc/oraInst.loc on Linux), the script performs several validations.
If all of the validations are successful, the DPK setup script uses the location set for inventory_loc in oraInst.loc for the Oracle 19c Database Server and Database Client installation locations.
If any of the validations fails, the script exits. If the oraInst.loc file is not accessible, or if the entries are not valid, the script instructs you to delete it and rerun the DPK setup script with the
--prereqoption.The validations include:
-
The existing oraInst.loc file must be accessible for reading.
-
The entries for inventory_loc and inst_group are present.
-
The directory defined by inventory_loc is present.
-
The group defined by inst_group is present.
-
If all validations are successful, the script sets the permission to 775 for the directory defined by inventory_loc.
Setting the permission to 775 gives the directory owner and group read, write, and execute permission, and all others read and execute access.
-
The script sets the group ownership for the directory defined by inventory_loc to inst_group.
-
-
If oraInst.loc does not exist (/etc/oraInst.loc on Linux), the DPK setup script uses the location /srv/dpk/oracle for the central inventory location and the group oinstall for inst_group. The script:
-
Checks for the oinstall group, and creates it if it does not exist.
-
Checks for the /srv/dpk/oracle directory, and creates it if it does not exist.
-
Sets the group ownership for the /srv/dpk/oracle directory to oinstall.
-
Sets the permission to 775 for the /srv/dpk/oracle directory.
-
On Linux only, after either successfully validating an existing oraInst.loc, or creating a valid central inventory location, the script prompts the root user to give non-root users the necessary access to the central inventory location. If you answer Yes to the prompt:
-
The script verifies that the user name entered belongs to a valid user.
If the user is not valid, the script exits. Identify the correct user name for a valid non-root user and rerun the DPK setup script with the
--prereqoption. -
The script adds the non-root user to the group defined by inst_group in the existing oraInst.loc file or to the newly created oinstall group.
-
If the non-root user is added successfully, you are prompted to give access to more users.
For information on managing Linux users, groups, and permissions, see the documentation for your Linux operating systems.
To verify that a non-root user, such as psftuser, belongs to
the correct group, such as oinstall, sign in to the psftuser account
as root, and run the id command. The list
of groups should include oinstall; for example:
uid=1223 (psftuser) gid=8500 (dba) groups=8500 (dba), 56789 (oinstall)To verify that the central inventory location, such as /srv/dpk/oracle, has the correct permission, use a command to list the directory contents. The listing includes the read, write, and execute permissions (rwx), user, group, size, and file name.
cd /srv/dpk
ls -al
total 12
drwxr-xr-x 3 root root 4096 Jul 16 18:17 .
drwxr-xr-x. 3 root root 4096 Jul 16 18:17 ..
drwxrwxr-x 4 psftuser oinstall 4096 Jul 16 19:58 oracle