Automated Script to Copy MYSQL libraries to System Directories and Copy apg-services script file to systemd

SRM 6.0.0.0/6.1.0.0 | Automated Script to Copy MYSQL libraries to System Directories and Copy apg-services script file to systemd


InfoSummary :    This script will copy the required MySQL Libraries and apg-services script file to System directories for SRM/SMR Binary Linux ( RHEL and SUSE ) deployments  . The script should be executed at  SRM/SMR Pre-upgrade level.
  1. Steps to Execute the Script on 4VM or Scaled Linux Application 

  • Copy the script to the Frontend server - Linux_Binary_MySql_Systemd_Automated_Script.zip to <APG-INSTALLED-PATH>/opt
  • Navigate to <APG-INSTALLED-PATH>/opt
  • Execute the below commands and see the README.txt for more information.
    • unzip Linux_Binary_MySql_Systemd_Automated_Script.zip
    • chmod +x Linux_Binary_MySql_Systemd_Automated_Script.sh
    •  Execute the command - ./Linux_Binary_MySql_Systemd_Automated_Script.sh  -i
      • First time execution reads all the SRM servers and enter the password to establish ssh connection  
    •  Re-run the command - ./Linux_Binary_MySql_Systemd_Automated_Script.sh  -i
      • Second time execution it copies the MySQL libraries to system directories (lib and lib64) and apg-services script file to Systemd .


  1. Steps for 1VM SRM And SMR Linux Application 

  • Copy the script to the server
    •   SMR_SRM_AIO_Linux_Binary_MySQL_Systemd_Script.zip to <APG-INSTALLED-PATH>/opt/
  • Navigate to the directory
    • cd <APG-INSTALLED-PATH>/opt
  • Unzip the script package
    •  unzip SMR_SRM_AIO_Linux_Binary_MySQL_Systemd_Script.zip
  • Move into the extracted folder
    • cd SMR_SRM_AIO_Linux_Binary_MySQL_Systemd_Script
  • Contents of this folder include:
    • SMR_SRM_AIO_Linux_Binary_MySQL_Systemd_Script.sh, libraries, README.txt
  • Provide execute permission to the script:
    • chmod +x SMR_SRM_AIO_Linux_Binary_MySQL_Systemd_Script.sh
  • Execute the script:
    • bash SMR_SRM_AIO_Linux_Binary_MySQL_Systemd_Script.sh
  • Enter the Installed Directory
    • Enter installation directory [default: /opt/APG]:
  • This script performs the following actions:

    • Copies MySQL shared libraries (.so files) to system directories (/lib and /lib64)

    • Copies the apg-services script to Systemd.


  • Post SMR Upgrade Steps - After completing the SMR upgrade, restore the environment variables
  •                         export LD_LIBRARY_PATH="$OLD_LD_LIBRARY_PATH"
                            unset OLD_LD_LIBRARY_PATH

Notes
Important Notes:

  • Automated scripts handles the scaled additional backend nodes (which are scaled at pre_upgrade level)
  • Post Upgrade to SRM 6.0.0.0 : Scaling any additional backend doesn't required execution of script.
  • If the customer is using non-default permissions for newly created files and directories, ensure that the required read (r) and execute (x) permissions are granted to group and other users for MySQL-dependent library files.This is necessary to avoid access or runtime issues during application execution.
    Run the following commands:
    chmod go+rx /usr/lib/libabsl_debugging_internal.so
    chmod go+rx /usr/lib/libabsl_demangle_internal.so
    chmod go+rx /usr/lib64/libabsl_debugging_internal.so
    chmod go+rx /usr/lib64/libabsl_demangle_internal.so
    chmod go+rx /opt/APG/bin/.runtime/service/systemd-startup.sh


    • Related Articles

    • SRM vApp External Automated Upgrade Script

      Overview This script automates the SRM update process for vApp environments. It supports both All-in-One (AIO) and Distributed deployments. Important Notes Windows SRM environments are not updated by this script they are skipped and must be handled ...
    • SRM Linux External Automated Upgrade Script

      Overview This script automates the update process for SRM binary linux platforms, including RHEL and SLES. It supports both All-in-One (AIO) and Distributed environments. Important Notes Windows SRM environments are not updated by this script; they ...
    • Storage MnR vApp External Automated Upgrade Script

      Overview This script automates the SMR update process for vApp environments. Important Notes Windows servers are not updated by this script; they are skipped and must be handled manually. Prerequisites Before running the script, ensure the following ...
    • Storage MnR Linux External Automated Upgrade Script

      Overview This script automates the update process for Storage MnR binary Linux platforms, including RHEL and SLES. Important Notes Windows Storage MnR environments are not updated by this script; they are skipped and must be handled manually. ...
    • SRM 6.1.0.0 - Stored Report Hotfix

      Issue Description: After the SRM upgrade that included Java 17, previously stored report files serialized using older Java versions fail during deserialization. This occurs due to incompatibilities introduced by changes in Java’s ...