Installation & Upgrade & De-installation
This chapter describes all installation/upgrade/de-installation steps.
Installation
Ansible
Several playbooks are available and recommended for MariaDB prerequisites, source and DMK installation.
Please follow the instruction in Readme.md in dmk/ansible.
Prerequisites
This paragraph describes all necessary steps which must be completed before you start the DMK installation.
The system must come with a perl installation
Execute the below command to check if perl is installed:
which perlOtherwise install the following packages if needed.
$ apt install zip libswitch-perl libaio1 libaio-dev ksh libncurses5 sudo tuned psmisc -ybas$ sudo yum install ksh perl-Switch wget -y$ sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
$ dnf install ksh perl-Switch tar libncurses.so.5 ncurses-compat-libs wget$ dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
$ dnf config-manager --enable epel
$ dnf config-manager --set-enabled powertools
$ dnf install ksh perl-Switch tar libncurses.so.5 ncurses-compat-libs wget$ dnf install epel-release -y
$ dnf config-manager --enable epel
$ dnf config-manager --set-enabled crb
$ dnf install ksh perl-Switch tar wget perl
$ cd /usr/lib64
$ sudo ln -s libtinfo.so.6 libtinfo.so.5
$ sudo ln -s libncurses.so.6 libncurses.so.5Ensure the mysql.cnf configuration file exists
Software extraction
Based on the dbi services and OFA (Oracle Flexible Architecture) best practices extract the archive under ${MYQL_BASE}/local, as explained below: 
gzip --decompress dmk-xx-xx-xxxx.tar.gz
tar -xvf dmk-xx-xx-xxxx.tarTypically, ${MYSQL_BASE} match:
“/u01/app/mysql” on Linux/Unix
Adapt the DMK configuration file
This is one of the most important installation steps, once extracted the “default” configuration file is available under ${DMK_HOME}/etc.
${DMK_HOME}/etc/dmk.conf.unix for Linux
Adapt the following variables
MYSQL_BASE, set it as explained in the OFA document
MYSQL_CNF, location of the mysql.cnf
⚠️ During the installation, the “default**” configuration file ${DMK_HOME}/etc/dmk.conf.unix is renamed to dmk.conf**. This mechanism avoids any configuration loss in case of upgrades.
Install
Install DMK, from the ${DMK_HOME}/bin directory or with absolute path as follows:
For Linux/Unix use the appropriate SHELL script : 
mysql@vmoraoel:/u01/app/mysql/local/dmk/bin/#> echo $SHELL
/bin/bash
mysql@vmoraoel:/u01/app/mysql/local/dmk/bin/#> . ./dmk.shDon’t be afraid, the installation is automated without questioning.
Congratulations you have successfully installed DMK!
DMK as ROOT or another user
DMK doesn’t only belong to a unique/specific user, if the necessary privileges are correctly distributed you can start DMK from another user as presented below.
Install and source DMK under the target user
[root@vmoraoel ~]# . /u01/app/mysql/local/dmk/bin/dmk.shOnce installed it can be sourced using the DBA’s login profile
[root@vmoraoel ~]# . /home/mysql/.profileUpgrade
dbi services recommend to perform a backup of your DMK package before upgrading.
The upgrade process is similar to the installation except that the prerequisites are already fulfilled:
Extract the software as explained in chapter 3.1.3 Software extraction
Install DMK as explained in chapter 3.1.5 Install
That’s it!
⚠️ Upgrades don’t affect the configuration file “${DMK_HOME}/etc/dmk.conf” file, please review this for newly introduced aliases or variables.
De-installation
This paragraph describes the de-installation of the DMK toolkit.
For Linux: 
rm ~/.DMK_*
rm -rf $DMK_HOMEDo not forget to remove the profile from your environment.
Last updated