Can you provide an example script for installing SCM Server v13.0.3 and 13.0.4 on Redhat Linux 8.x
Release : 13.0.3
Component : CA HARVEST SCM INTERFACES (CLI/API/SDK)
This example assumes a new Redhat Linux (or Oracle Linux) image with Oracle v19c server or 64-bit client installed and the TNS Names file already configured to access an empty database. The SCM v13.0.3 install files will be pulled from the ISO disk image, but the v13.0.4 Refresh Pack installation zip file and the “ca.olf” license file have already been copied to a temporary folder “/tmp/scm” from which the installation files will be staged.
Perform the first part of this installation while logged in as the “root” user.
1. Do a yum update and install prerequisite packages
Example:
yum update -y
yum install pam.* -y
yum install libstdc++.* -y
yum install libstdc++-devel.* -y
yum install ncurses.* -y
yum install ncurses-devel.* -y
2. Mount the DVD image and copy the server install files to a temp folder.
Example:
cd /run/media/rootdev/SCM_V13_0_3_INSTALL/server/linux_x86_64/
cp *.gz /tmp/scm
3. Create the “cascm” user and group
Example:
umask 0022
groupadd cascm
useradd -g cascm cascm
passwd cascm
4. Create a script that sets the environment variables and hook that into the “.bash_profile”
Example:
# Copy all lines from "cat >" to "EOF" and paste as one block.
cat > /home/cascm/set_env.sh <<EOF
#!/bin/bash
export CASHCOMP=/opt/CA/SharedComponents
export CABIN=\$CASHCOMP/bin
export CALIB=\$CASHCOMP/lib
# Note: You need to set ORACLE_HOME to the installation folder for Oracle on this computer.
# Be sure if you’re installing 32-bit Harvest server, the Oracle software must also be 32-bit,
# or for 64-bit Harvest you need 64-bit Oracle.
export ORACLE_HOME=/app/oracle/product/19.0.0/dbhome_1
export ORACLE_SID=orcl
export PATH=\$ORACLE_HOME/bin:\$PATH
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export CAPKIHOME=\$CASHCOMP/CAPKI
export PATH=\$CABIN:\$PATH
export LD_LIBRARY_PATH=\$CALIB:\$LD_LIBRARY_PATH
export ODBC_HOME=/opt/CA/odbc
# Next 2 only needed for RHEL 8.x
export PATH=\$ODBC_HOME:\$PATH
export LD_LIBRARY_PATH=\$ODBC_HOME/lib:\$LD_LIBRARY_PATH
export RTHOME=/opt/CA/pec
export PATH=\$RTHOME:\$PATH
export LD_LIBRARY_PATH=\$RTHOME/lib/i86_64_linux24:\$LD_LIBRARY_PATH
export CA_SCM_HOME=/opt/CA/scm
export PATH=\$CA_SCM_HOME/bin:\$PATH
export LD_LIBRARY_PATH=\$CA_SCM_HOME/lib:\$LD_LIBRARY_PATH
EOF
chown cascm:cascm /home/cascm/set_env.sh
chmod a+x /home/cascm/set_env.sh
# Copy all lines from "cat >>" to "EOF" and paste as one block.
cat >> /home/cascm/.bash_profile <<EOF
. /home/cascm/set_env.sh
EOF
5. Create the directories we'll need for installation and set ownership and permissions.
Example:
mkdir -p /opt/CA/scm /opt/CA/pec /opt/CA/odbc /opt/CA/SharedComponents/lib /opt/CA/SharedComponents/bin
chown -R cascm:cascm /opt/CA/scm /opt/CA/pec /opt/CA/odbc /opt/CA/SharedComponents /tmp/scm
chmod -R 755 /opt/CA/scm /opt/CA/pec /opt/CA/odbc /opt/CA/SharedComponents /tmp/scm
6. Install the licensing component and copy the license file into the licensing software folder
Example:
cd /tmp/scm/
mkdir lic98
mv lic98.tar.gz lic98
cd lic98/
gunzip lic98.tar.gz
tar xvf lic98.tar
cd lic98_install/
./install
cp /tmp/scm/ca.olf /opt/CA/SharedComponents/ca_lic/
7. *** For RHEL 8.x only *** Add a symbolic link from libncurses.so.6 to libncurses.so.5 for each occurrence of “libncurses.so.6”
Example:
# Locate all copies of “libncurses.so.6”
find / -name "libncurses.so.6"
# Then, for each copy of “libncurses.so.6” that was found, cd to the folder it is in and execute
ln -s libncurses.so.6 libncurses.so.5
8. Install CAPKI
Example:
cd /tmp/scm/
mkdir etpki
mv etpki.tar.gz etpki
cd etpki/
gunzip etpki.tar.gz
tar xvf etpki.tar
cd etpki_linux/
./setup install caller=SCMSERVER verbose env=all
Perform the rest of this installation as the “cascm” user
9. Switch to the “cascm” user
Example:
su - cascm
umask 0022
10. Check to make sure Oracle database is accessible via TNS
Example:
sqlplus [email protected]/oracle
11. Install ODBC (When it asks for ODBC Installation you will need to type in “/opt/CA/odbc”)
Example:
cd /tmp/scm/
mkdir odbc
mv odbc.tar.gz odbc
cd odbc/
gunzip odbc.tar.gz
tar xvf odbc.tar
cd odbc/
./install.sh
12. Install PEC
Example:
cd /tmp/scm/
mkdir pec
mv pec474_64.tar.gz pec
cd pec/
gunzip pec474_64.tar.gz
tar xvf pec474_64.tar
# This next step fixes a glitch in the INSTALL.SH so that it runs under c-shell instead of korn shell.
sed -i 's/ksh/sh/g' INSTALL.SH
./INSTALL.SH configure_rtserver=false
13. Move the SCM installation tar file to “/opt/CA/scm”, unzip and install. When asked, do NOT run hdbsetup at this time. We will do that after the installation of 13.0.4.
Example:
cd /tmp/scm/
mv scm.tar.gz /opt/CA/scm
cd /opt/CA/scm
gunzip scm.tar.gz
tar xvf scm.tar
cd install/
./install.sh
14. Set up the start and stop scripts
Example:
mkdir /home/cascm/scripts
# Copy all lines from "cat >" to "EOF" and paste as one block.
cat > /home/cascm/scripts/startup.sh <<EOF
#!/bin/bash
/opt/CA/scm/bin/bkrd
ps -ef | grep scm
EOF
# Copy all lines from "cat >" to "EOF" and paste as one block.
cat > /home/cascm/scripts/shutdown.sh <<EOF
#!/bin/sh
. /opt/CA/pec/bin/rtinit.sh
/opt/CA/pec/bin/i86_64_linux24/rtserver.x -stop_all
ps -ef | grep scm
EOF
chmod -R a+w /home/cascm/scripts
chmod a+x /home/cascm/scripts/*.sh
15. To prepare for applying the 13.0.4 patch, we will rename the existing “/opt/CA/odbc” folder and create a new, empty odbc folder in the same location.
(In this example, due to ownership and permissions on the “/opt/CA” folder this must be done as root.)
Example:
su
cd /opt/CA/
mv odbc odbc1303
mkdir odbc
chown -R cascm:cascm odbc
chmod -R 775 odbc
ls -al
exit
16. # Unzip the 13.0.4 refresh pack zip file.
Example:
cd /tmp/scm/
unzip CAHarvestSCMV1304RefreshPack_Linux64.zip
cd Linux64/
tar xvf completeinstall.tar
17. Install the new odbc module (When it asks for ODBC Installation you will need to type in “/opt/CA/odbc”)
Example:
cd odbc/
tar xvf odbc.tar
cd odbc/
./install.sh
18. Install the v13.0.4 Refresh Pack Server Module
Example:
cd ../../
tar xvf CAHarvestSCMV1304RefreshPackServer.tar
cd CAHarvestSCMV1304RefreshPackServer/
umask 0022
./ApplyServerPATCH.sh
19. Now we can run “hdbsetup” to configure the ODBC datasource (options CO, CR, EP, LP, and LF options)
Example:
cd /opt/CA/scm/bin/
./hdbsetup
20. Try to start the broker to see if it runs. Run a command line utility to confirm it can connect.
Example:
./bkrd
ps -ef | grep scm
hgetusg -b olnx84-orcl19c -usr harvest -pw harvest -cu ; cat hgetusg.log
The final step must be performed as root.
21. Switch back to root user to set up auto-start service
Example:
exit
# Copy all lines from "cat >" to "EOF" and paste as one block.
cat > /etc/systemd/system/cascm.service <<EOF
# Invoking SCM scripts to start/shutdown
[Unit]
Description=CA Harvest SCM server
Requires=network.target
[Service]
Type=forking
Restart=no
ExecStart=/home/cascm/scripts/startup.sh
ExecStop=/home/cascm/scripts/shutdown.sh
User=cascm
Group=cascm
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl status cascm
systemctl enable cascm
22. Reboot to check and assure that SCM server is able to start automatically.
Example:
reboot
login as: root
ps -ef | grep scm
exit