--- SAS KeyStore ---


##
## STEP 01
##
### When prompted for a password, enter hyperic
### 
### AS user sas
su - sas

SHUTDOWN ALL TIERS
/opt/sasinside/SAS.Services stop

/opt/sasinside/config/metadata/Lev1/Web/SASEnvironmentManager/agent-5.8.0-EE/bin/hq-agent.sh stop

AS ROOT:  tar -cvf /sastmp/opt.tar /opt

##
## STEP 02
##
cd /opt/sasinside/config/compute/Lev1/Web/SASEnvironmentManager/agent-5.8.0-EE
tar -cvf config.tar config

cp -p  /opt/sasinside/config/midtier/Lev1/Web/SASEnvironmentManager/server-5.8.0-EE/conf/hyperic.keystore /opt/sasinside/config/midtier/Lev1/Web/SASEnvironmentManager/server-5.8.0-EE/conf/hyperic.keystore.09-22-2022 


cd /var/tmp/keystore


##
## STEP 03
##

/opt/sasinside/sashome/SASWebServer/9.4/httpd-2.4.43/bin/openssl pkcs12 -export -chain \
-inkey /opt/sasinside/config/midtier/Lev1/Web/WebServer/ssl/busas.binghamton.edu.key \
-in /opt/sasinside/config/midtier/Lev1/Web/WebServer/ssl/busas.binghamton.edu.crt  \
-name hq -CAfile /opt/sasinside/config/midtier/Lev1/Web/WebServer/ssl/bu.binghamton.pem \
-out hyperic.p12


##
## STEP 04
##


/opt/sasinside/sashome/SASPrivateJavaRuntimeEnvironment/9.4/jre/bin/keytool -importkeystore \
-srcstoretype PKCS12 -srckeystore /opt/sasinside/config/midtier/Lev1/Web/SASEnvironmentManager/server-5.8.0-EE/conf/hyperic.p12 -destkeystore hyperic.keystore -srcstorepass \
hyperic -deststorepass hyperic -destkeypass hyperic -alias hq


##
## STEP 05
##

POSTGRES_HOME=/opt/sasinside/sashome/SASWebInfrastructurePlatformDataServer/9.4
export PATH=${POSTGRES_HOME}/bin:$PATH
export LD_LIBRARY_PATH=${POSTGRES_HOME}/lib:$LD_LIBRARY_PATH

##
## STEP 06
##

### EVManager/EVManager1

/opt/sasinside/sashome/SASWebInfrastructurePlatformDataServer/9.4/bin/psql -h localhost -p 9432 -U EVManager -c "select * from public.eam_keystore;"

##
## STEP 07
##

### EVManager/EVManager1

/opt/sasinside/sashome/SASWebInfrastructurePlatformDataServer/9.4/bin/psql -h localhost -p 9432 -U EVManager -c "delete from eam_keystore;" 

Quit the psql console by typing \q and pressing Enter.

##
## STEP 08
##
Delete the contents of the /opt/sasinside/config/midtier/Lev1/Web/SASEnvironmentManager/agent-5.8.0-EE/data on all SAS server machines.
cd /opt/sasinside/config/midtier/Lev1/Web/SASEnvironmentManager/agent-5.8.0-EE
tar -cvf data.tar data
rm -rf data


Valid HTML 4.0 Transitional