According to the upgrade guide the rpm installation can be installed to different locations see upgrade guide on page 30
On the second command an error of RPM already installed may appear
Redhat 7.x
Redhat 6.x
In the upgrade guide it lists that you can use rpm switch --relocate to change the installation path of Enforce.
You have to stack the --relocate switches to be able to relocate multiple directories
##############################################
##Relocate script for 15.5 upgrade/install#############
##10/04/2019###################################
##Author: David Martin############################
#!/bin/bash
#DEFAULT LOCATIONS
SLOG="/var/log/Symantec/DataLossPrevention"
SVAR="/var/Symantec/DataLossPrevention"
SOPT="/opt/Symantec/DataLossPrevention"
SRUN="/var/run/Symantec/DataLossPrevention"
#new locations
LOG="/var/log/dlp"
VAR="/var/symc/DLP"
OPT="/opt/symc/DLP"
RUN="/var/run/Symc/DLP"
##variables for the 15.x rpms
CCS="symantec-dlp-15-5-content-extraction-service-15.5-17018.x86_64.rpm"
KEYVIEW="symantec-dlp-keyview-11-6-11.6.0.0-17018.x86_64.rpm"
PLUGINS="symantec-dlp-15-5-content-extraction-plugins-15.5-17018.x86_64.rpm"
COMMON="symantec-dlp-15-5-server-platform-common-15.5-17018.x86_64.rpm"
ENFORCE_DEP="symantec-dlp-enforce-server-system-dependencies-1.0.0-17018.x86_64.rpm"
ENFORCE_SERV="symantec-dlp-15-5-enforce-server-15.5-17018.x86_64.rpm"
ENFORCE_SERVICES="symantec-dlp-enforce-server-services-1.0.0-1.el6.x86_64.rpm"
function install ()
{
#symantec-dlp-15-1-content-extraction-service-15.1-1.el6.x86_64.rpm
rpm -ivh --relocate $SOPT=$OPT --relocate $SVAR=$VAR --relocate $SLOG=$LOG --relocate $SRUN=$RUN $CCS
#keyview RPM
rpm -ivh --relocate $SOPT=$OPT $KEYVIEW
#content extraction plugins
rpm -ivh --relocate $SOPT=$OPT --relocate $SVAR=$VAR --relocate $SLOG=$LOG --relocate $SRUN=$RUN $PLUGINS
#server platform
rpm -ivh --relocate $SOPT=$OPT --relocate $SVAR=$VAR $COMMON
#enforce-server-system-dependencies
rpm -ivh --relocate $SOPT=$OPT $ENFORCE_DEP
#ENFORCE_SERVICES
rpm -ivh --relocate $SOPT=$OPT --relocate $SRUN=$RUN $ENFORCE_SERVICES
#enforce server
rpm -ivh --relocate $SOPT=$OPT --relocate $SVAR=$VAR --relocate $SLOG=$LOG --relocate $SRUN=$RUN $ENFORCE_SERV
}
function MP1 ()
{
#readarray input |cut -d"=" -f2 < /etc/Symantec/DataLossPrevention/15.5/relocatable_roots.conf
#OPT=$OPT
#echo $OPT
#VAR=$VAR
#LOG=$LOG
#RUN=$RUN
PLUGINS_MP1="symantec-dlp-15-5-content-extraction-plugins-15.5.0100-01086.x86_64.rpm"
CCS_MP1="symantec-dlp-15-5-content-extraction-service-15.5.0100-01086.x86_64.rpm"
ENFORCE_SERV_MP1="symantec-dlp-15-5-enforce-server-15.5.0100-01086.x86_64.rpm"
COMMON_MP1="symantec-dlp-15-5-server-platform-common-15.5.0100-01086.x86_64.rpm"
#accept
rpm -Uvh --relocate $SOPT=$OPT --relocate $SVAR=$VAR --relocate $SLOG=$LOG --relocate $SRUN=$RUN $CCS_MP1
rpm -Uvh --relocate $SOPT=$OPT --relocate $SVAR=$VAR --relocate $SLOG=$LOG --relocate $SRUN=$RUN $PLUGINS_MP1
rpm -Uvh --relocate $SOPT=$OPT --relocate $SVAR=$VAR $COMMON_MP1
rpm -Uvh --relocate $SOPT=$OPT --relocate $SVAR=$VAR --relocate $SLOG=$LOG --relocate $SRUN=$RUN $ENFORCE_SERV_MP1
}
function MP2 ()
{
#readarray input | cut -d"=" -f2 < /etc/Symantec/DataLossPrevention/15.5/relocatable_roots.conf
OPT=$OPT
VAR=$VAR
LOG=$LOG
RUN=$RUN
PLUGINS_MP2="symantec-dlp-15-5-content-extraction-plugins-15.5.0200-01034.x86_64.rpm"
CCS_MP2="symantec-dlp-15-5-content-extraction-service-15.5.0200-01034.x86_64.rpm"
ENFORCE_SERV_MP2="symantec-dlp-15-5-enforce-server-15.5.0200-01034.x86_64.rpm"
COMMON_MP2="symantec-dlp-15-5-server-platform-common-15.5.0200-01034.x86_64.rpm"
#accept
rpm -Uvh --relocate $SOPT=$OPT --relocate $SVAR=$VAR --relocate $SLOG=$LOG --relocate $SRUN=$RUN $CCS_MP2
rpm -Uvh --relocate $SOPT=$OPT --relocate $SVAR=$VAR --relocate $SLOG=$LOG --relocate $SRUN=$RUN $PLUGINS_MP2
rpm -Uvh --relocate $SOPT=$OPT --relocate $SVAR=$VAR $COMMON_MP2
rpm -Uvh --relocate $SOPT=$OPT --relocate $SVAR=$VAR --relocate $SLOG=$LOG --relocate $SRUN=$RUN $ENFORCE_SERV_MP2
cd $OPT/EnforceServer/15.5/Protect/install
}
#function accept()
#{
#echo "these are the paths we will install to"
#echo "/opt/Symantec=$OPT"
#echo "/var/Symantec=$VAR"
#echo "/var/log/Symantec=$LOG"
#echo "/var/run/Symantec=$RUN"
#read answer
#if [ answer != y ] || [ answer != Y ]
# then
# echo "we are exiting, please change the paths in the script"
# exit 0
#fi
#}
echo "Please select 1 for install, 2 to upgrade to MP1, 3 to upgrade to MP2"
read version
case $version in
1)
install
;;
2)
MP1
;;
3)
MP2
;;
*)
echo "invalid input"
;;
esac
NOTE: What available relocate commands or locations are available.
To view what each rpm is configured for you can run the following command.
Below is an example output of the above command: