Installation & Upgrade & De-installation (Unix)
This chapter describes all installation/upgrade/de-installation steps.
Installation / Upgrade
There is no big difference between installation and upgrade. In both cases you will extract the software in the destination directory and call dmk.sh
to configure it.
If it is a new installation, DMK will create the local configuration files.
If it is an upgrade, it will keep the already existing local configuration files, but it overwrites the default DMK configuration. That's the reason why you must not edit dmk.conf.default
, but dmk.conf.local
!
Prerequisites
DMK requires the Korn-shell (ksh) for its shell-scrips.
The shell for interactive work (login shell) can be ksh or bash. We recommend the bash shell (possibility for command-completion).
DMK requires a Perl with the standard modules for initial startup.
We recommend having a perl binary reachable via the the $PATH variable;
alternatively specify it with
export PERL_EXEC=/path/to/perl
(e.g. in .bash_profile or .profile).Do not hardcode the path to a perl in a $ORACLE_HOME (it can be deinstalledâĻ)
As fallback, DMK looks for a perl in the first ORACLE_HOME found in /etc/oratab.
The ~/.DMK_PERL file of older DMK 1.x releases is no longer used.
Hint: After the initial startup, DMK uses the Perl of the current ORACLE_HOME.
Before upgrade
If you upgrade a former installation, we recommend backing up your old installation.
Or you can also do a new installation and hide the old installation (for fallback/review). This is the recommended way if you upgrade from a DMK 1.x version.
â ī¸IMPORTANT: move it to a hidden directory (beginning with a dot '.') or to another directory level! Otherwise DMK thinks it is an additional DMK package and integrates it in the environment :-(
If you upgraded from a DMK 1.x version, we recommend to cleanup the oratab file. Remove dummy-entries, remove PDB's from the SID-entries. The dmk.oratab file can be removed, it Is no longer used. It Is now handled in new configuration files, see later.
Software extraction
Based on the dbi services and OFA (Oracle Flexible Architecture) best practices, extract the zipfile under ${ORACLE_BASE}/local
:
Initial configuration
The initial configuration is done with the same script (dmk.sh) as you set the environment afterwards.
The first time it creates the ~/.DMK_HOME
configuration file with the location of DMK. For that step, the script can be executed or sourced (except: on AIX with ksh it must be executed).
Hint for upgrade: If you used dmk.bash / dmk.ksh in your scripts: There is no need to update it to dmk.sh; It references the same code (symlink).
Each time dmk.sh is called, it tries to automatically configure or update the environment. It detects the ORACLE_HOME's, the SIDs, then it creates or updates the configuration files. If this automatic procedure fails, it can be configured manually.
In case of an upgrade from DMK 1.x: The former dmk.conf file will be converted to dmk.conf.local and the old file is renamed to dmk.conf.old; In the new file there are only the lines you changed/added. The unchanged lines from the template are removed.
The template lines are now in dmk.conf.default (do NOT change this file! it will be overwritten with the next update).
The oratab file should no longer be adapted for DMK specific settings. After the upgrade from DMK 1.x, we recommend to cleanup the oratab file. Remove dummy-entries, remove PDB's from the SID-entries. This information is now stored in new configuration files, see later.
Automatic activation of DMK
To activate DMK, it must be sourced (mind the dot and space before the script, otherwise the script is executed and not sourced)
Source dmk.sh in your profile.
Profile for ksh is
~/.profile
Profile for bash is
~/.bash_profile
(or .profile if .bash_profile is missing). We recommend to use the same file for ksh and bash by creating a symlink:ln -s ~/.bash_profile ~/.profile
You can use the provided template
Or if you prefer a minimal version, add this line to your profile:
If you do not want to automatically activate DMK at login, create an easy to remember alias to source DMK manually:
Or if you want to activate DMK automatically only in interactive shells:
Summary
Using DMK as another user
An existing DMK installation can also be used by other users, if the necessary privileges are correctly set (especially write-access to $ORACLE_BASE/local/dmk/log). For an installation of Grid Infrastructure with role separation (users grid and oracle), it is recommended to change all files and directories to the common oinstall group and give write-access to the group.
Ensure that /home/oracle/.DMK_HOME file is readable by the other user. Check that the files in $ORACLE_HOME/perl are readable/executable for the user (depending on the Oracle version these permissions are restricted and must be changed).
De-installation
If you want to fully deinstall DMK:
If you used the DMK scripts for automatic Oracle services startup at boot-time, then you also have to revert that (as root).
Last updated