├── LICENSE ├── README.md ├── centos7 ├── fb_hqbird_centos7-25.sh ├── fb_hqbird_centos7-30.sh ├── fb_hqbird_centos7-40.sh ├── fb_hqbird_centos7-50.sh ├── fb_vanilla_centos7-25.sh ├── fb_vanilla_centos7-30.sh ├── fb_vanilla_centos7-40.sh └── fb_vanilla_centos7-50.sh ├── centos8 ├── fb_hqbird_centos8-25.sh ├── fb_hqbird_centos8-30.sh ├── fb_hqbird_centos8-40.sh ├── fb_hqbird_centos8-50.sh ├── fb_vanilla_centos8-25.sh ├── fb_vanilla_centos8-30.sh ├── fb_vanilla_centos8-40.sh └── fb_vanilla_centos8-50.sh ├── centos9 ├── fb_hqbird_centos9-25.sh ├── fb_hqbird_centos9-30.sh ├── fb_hqbird_centos9-40.sh ├── fb_hqbird_centos9-50.sh ├── fb_vanilla_centos9-25.sh ├── fb_vanilla_centos9-30.sh ├── fb_vanilla_centos9-40.sh └── fb_vanilla_centos9-50.sh ├── debian11 ├── fb_hqbird_deb11-25.sh ├── fb_hqbird_deb11-30.sh ├── fb_hqbird_deb11-40.sh ├── fb_hqbird_deb11-50.sh ├── fb_vanilla_deb11-25.sh ├── fb_vanilla_deb11-30.sh ├── fb_vanilla_deb11-40.sh └── fb_vanilla_deb11-50.sh ├── debian12 ├── fb_hqbird_deb12-25.sh ├── fb_hqbird_deb12-30.sh ├── fb_hqbird_deb12-40.sh ├── fb_hqbird_deb12-50.sh ├── fb_vanilla_deb12-25.sh ├── fb_vanilla_deb12-30.sh ├── fb_vanilla_deb12-40.sh └── fb_vanilla_deb12-50.sh ├── fb_hqbird_ub20-25.sh ├── opensuse15 ├── fb_hqbird25_opensuse15.sh ├── fb_hqbird30_opensuse15.sh ├── fb_hqbird40_opensuse15.sh └── fb_hqbird50_opensuse15.sh ├── oracle8 ├── fb_hqbird_ol8-25.sh ├── fb_hqbird_ol8-30.sh ├── fb_hqbird_ol8-40.sh ├── fb_hqbird_ol8-50.sh ├── fb_vanilla_ol8-25.sh ├── fb_vanilla_ol8-30.sh ├── fb_vanilla_ol8-40.sh └── fb_vanilla_ol8-50.sh ├── oracle9 ├── fb_hqbird_ol9-25.sh ├── fb_hqbird_ol9-30.sh ├── fb_hqbird_ol9-40.sh ├── fb_hqbird_ol9-50.sh ├── fb_vanilla_ol9-25.sh ├── fb_vanilla_ol9-30.sh ├── fb_vanilla_ol9-40.sh └── fb_vanilla_ol9-50.sh ├── rockylinux8 ├── fb_hqbird_rocky8-25.sh ├── fb_hqbird_rocky8-30.sh ├── fb_hqbird_rocky8-40.sh ├── fb_hqbird_rocky8-50.sh ├── fb_vanilla_rocky8-fb25.sh ├── fb_vanilla_rocky8-fb30.sh ├── fb_vanilla_rocky8-fb40.sh └── fb_vanilla_rocky8-fb50.sh ├── rockylinux9 ├── fb_hqbird_rocky9-25.sh ├── fb_hqbird_rocky9-30.sh ├── fb_hqbird_rocky9-40.sh ├── fb_hqbird_rocky9-50.sh ├── fb_vanilla_rocky9-25.sh ├── fb_vanilla_rocky9-30.sh ├── fb_vanilla_rocky9-40.sh └── fb_vanilla_rocky9-50.sh ├── ubuntu20 └── fb_hqbird_ub20-25.sh ├── ubuntu22 ├── fb_hqbird_ub22-25.sh ├── fb_hqbird_ub22-30.sh ├── fb_hqbird_ub22-40.sh ├── fb_hqbird_ub22-50.sh ├── fb_vanilla_ub22-25.sh ├── fb_vanilla_ub22-30.sh ├── fb_vanilla_ub22-40.sh └── fb_vanilla_ub22-50.sh └── ubuntu24 ├── fb_hqbird_ub24-25.sh ├── fb_hqbird_ub24-30.sh ├── fb_hqbird_ub24-40.sh ├── fb_hqbird_ub24-50.sh ├── fb_vanilla_ub24-25.sh ├── fb_vanilla_ub24-30.sh ├── fb_vanilla_ub24-40.sh └── fb_vanilla_ub24-50.sh /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 IBSurgeon Ltd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Firebird Linux Installation Scripts 2 | 1-step installations scripts to install Firebird 5, 4, 3, 2.5 (vanilla or HQbird) for all popular Linux distros with OS optimizations 3 | 4 | ## What these scripts do: 5 | * Download and install prerequisites libraries and packages 6 | * Adjust necessary OS parameters (vm.max_map_count) 7 | * Download the latest Firebird tarball or Firebird+HQbird archives from official sources 8 | * Install Firebird or Firebird +HQbird 9 | * Add necessary ports to firewalls 10 | 11 | 12 | ## How to use 1-step installation script 13 | 14 | * Download script 15 | * make it executable 16 | * run it 17 | 18 | ### Example for Ubuntu 22, Firebird 2.5 HQbird 19 | ``` 20 | sudo wget https://raw.githubusercontent.com/IBSurgeon/firebirdlinuxinstall/main/ubuntu22/fb_hqbird_ub22-25.sh 21 | sudo chmod +x fb_hqbird_ub22-25.sh 22 | sudo ./fb_hqbird_ub22-25.sh 23 | ``` 24 | 25 | ### Example for CentOS7, Firebird 3.0 vanilla 26 | ``` 27 | sudo wget https://raw.githubusercontent.com/IBSurgeon/firebirdlinuxinstall/main/centos7/fb_vanilla_centos7-30.sh 28 | sudo chmod +x fb_vanilla_centos7-30.sh 29 | sudo ./fb_vanilla_centos7-30.sh 30 | ``` 31 | -------------------------------------------------------------------------------- /centos7/fb_vanilla_centos7-25.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/FirebirdCS-2.5.9.27139-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | yum update -y 72 | yum install -y epel-release 73 | yum install -y wget ncurses libtommath icu lsof mc 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 93 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 94 | 95 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 96 | firewall-cmd --reload 97 | 98 | exit_script 0 99 | 100 | -------------------------------------------------------------------------------- /centos7/fb_vanilla_centos7-30.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=3.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v3.0.12/Firebird-3.0.12.33787-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | yum update -y 72 | yum install -y epel-release 73 | yum install -y wget ncurses libtommath icu lsof mc 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 96 | firewall-cmd --reload 97 | 98 | exit_script 0 99 | 100 | -------------------------------------------------------------------------------- /centos7/fb_vanilla_centos7-40.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=4.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v4.0.5/Firebird-4.0.5.3140-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | yum update -y 72 | yum install -y epel-release 73 | yum install -y wget ncurses libtommath icu lsof 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 96 | firewall-cmd --reload 97 | 98 | exit_script 0 99 | 100 | -------------------------------------------------------------------------------- /centos7/fb_vanilla_centos7-50.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v5.0.1/Firebird-5.0.1.1469-0-linux-x64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | yum update -y 72 | yum install -y epel-release 73 | yum install -y wget ncurses libtommath icu lsof mc libatomic 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 96 | firewall-cmd --reload 97 | 98 | exit_script 0 99 | 100 | -------------------------------------------------------------------------------- /centos8/fb_vanilla_centos8-25.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/FirebirdCS-2.5.9.27139-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | yum update -y 72 | yum install -y epel-release 73 | yum install -y wget ncurses ncurses-compat-libs libtommath icu lsof 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 93 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 94 | 95 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 96 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 97 | firewall-cmd --reload 98 | 99 | exit_script 0 100 | 101 | -------------------------------------------------------------------------------- /centos8/fb_vanilla_centos8-30.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=3.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v3.0.12/Firebird-3.0.12.33787-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | yum update -y 72 | yum install -y epel-release 73 | yum install -y wget ncurses ncurses-compat-libs libtommath icu lsof 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 96 | firewall-cmd --reload 97 | 98 | exit_script 0 99 | 100 | -------------------------------------------------------------------------------- /centos8/fb_vanilla_centos8-40.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=4.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v4.0.5/Firebird-4.0.5.3140-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | yum update -y 72 | yum install -y epel-release 73 | yum install -y wget ncurses ncurses-compat-libs libtommath icu lsof 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 96 | firewall-cmd --reload 97 | 98 | exit_script 0 99 | 100 | -------------------------------------------------------------------------------- /centos8/fb_vanilla_centos8-50.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v5.0.1/Firebird-5.0.1.1469-0-linux-x64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | yum update -y 72 | yum install -y epel-release 73 | yum install -y wget ncurses-compat-libs ncurses libtommath icu lsof libatomic 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 96 | firewall-cmd --reload 97 | 98 | exit_script 0 99 | 100 | -------------------------------------------------------------------------------- /centos9/fb_vanilla_centos9-25.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/FirebirdCS-2.5.9.27139-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf update -y 72 | dnf install -y epel-release 73 | dnf install -y wget ncurses ncurses-compat-libs libtommath icu lsof tar 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 93 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 94 | 95 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 96 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 97 | firewall-cmd --reload 98 | 99 | exit_script 0 100 | 101 | -------------------------------------------------------------------------------- /centos9/fb_vanilla_centos9-30.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=3.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v3.0.12/Firebird-3.0.12.33787-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf update -y 72 | dnf install -y epel-release 73 | dnf install -y wget ncurses ncurses-compat-libs libtommath icu lsof tar 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 96 | firewall-cmd --reload 97 | 98 | exit_script 0 99 | 100 | -------------------------------------------------------------------------------- /centos9/fb_vanilla_centos9-40.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=4.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v4.0.5/Firebird-4.0.5.3140-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf update -y 72 | dnf install -y epel-release 73 | dnf install -y wget ncurses ncurses-compat-libs libtommath icu lsof tar 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 96 | firewall-cmd --reload 97 | 98 | exit_script 0 99 | 100 | -------------------------------------------------------------------------------- /centos9/fb_vanilla_centos9-50.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v5.0.1/Firebird-5.0.1.1469-0-linux-x64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf update -y 72 | dnf install -y epel-release 73 | dnf install -y wget ncurses ncurses-compat-libs libtommath icu lsof tar 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 96 | firewall-cmd --reload 97 | 98 | exit_script 0 99 | 100 | -------------------------------------------------------------------------------- /debian11/fb_hqbird_deb11-50.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FTP_URL="https://cc.ib-aid.com/download/distr" 9 | 10 | SYSCTL=/etc/sysctl.conf 11 | SYS_STR="vm.max_map_count" 12 | 13 | TMP_DIR=$(mktemp -d) 14 | OLD_DIR=$(pwd -P) 15 | ENOUGH_MEM=7168000 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu67 wget unzip gettext libncurses5 curl tar tzdata locales sudo mc xz-utils file apt-transport-https gpg libatomic1 73 | 74 | wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null 75 | echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list 76 | apt update 77 | apt install -y temurin-8-jre 78 | 79 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 80 | locale-gen "en_US.UTF-8" 81 | 82 | ## Firebird & Hqbird download 83 | download_file $FTP_URL/$FB_VER/fb.tar.xz $TMP_DIR "FB installer" 84 | download_file $FTP_URL/$FB_VER/conf.tar.xz $TMP_DIR "FB config files" 85 | download_file $FTP_URL/amvmon.tar.xz $TMP_DIR "AMV & MON installer" 86 | download_file $FTP_URL/distrib.tar.xz $TMP_DIR "DG installer" 87 | download_file $FTP_URL/hqbird.tar.xz $TMP_DIR "HQbird installer" 88 | 89 | echo Extracting FB installer ================================================== 90 | 91 | mkdir $TMP_DIR/fb $TMP_DIR/conf 92 | tar xvf $TMP_DIR/fb.tar.xz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 93 | tar xvf $TMP_DIR/conf.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 94 | cd $TMP_DIR/fb 95 | 96 | echo Running FB installer ===================================================== 97 | 98 | yes 'masterkey' | ./install.sh 99 | #./install.sh -silent 100 | cd $OLD_DIR 101 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 102 | 103 | echo Installing HQbird ======================================================== 104 | 105 | if [ ! -d /opt/hqbird ]; then 106 | echo "Creating directory /opt/hqbird" 107 | mkdir /opt/hqbird 108 | else 109 | echo "Directory /opt/hqbird already exists" 110 | fi 111 | 112 | tar xvf $TMP_DIR/amvmon.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking AMV archive" 113 | tar xvf $TMP_DIR/distrib.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking DG archive" 114 | tar xvf $TMP_DIR/hqbird.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking HQ archive" 115 | 116 | cp /opt/hqbird/amv/fbccamv.service /opt/hqbird/mon/init/systemd/fbcclauncher.service /opt/hqbird/mon/init/systemd/fbcctracehorse.service /opt/hqbird/init/systemd/hqbird.service /lib/systemd/system 117 | chmod -x /lib/systemd/system/fbcc*.service 118 | systemctl daemon-reload 119 | 120 | if [ ! -d /opt/hqbird/outdataguard ]; then 121 | echo "Creating directory /opt/hqbird/outdataguard" 122 | mkdir /opt/hqbird/outdataguard 123 | else 124 | echo "Directory /opt/hqbird/outdataguard already exists" 125 | fi 126 | echo "Running HQbird setup" 127 | sh /opt/hqbird/hqbird-setup 128 | rm -f /opt/firebird/plugins/libfbtrace2db.so 2 > /dev/null 129 | 130 | echo Registering HQbird ======================================================== 131 | 132 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv 133 | cp -R /opt/hqbird/conf/.defaults/server/* /opt/hqbird/conf/agent/servers/hqbirdsrv 134 | sed -i 's#server.installation =.*#server.installation=/opt/firebird#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 135 | sed -i 's#server.bin.*#server.bin = ${server.installation}/bin#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 136 | sed -i 's#server.id = .*#server.id = hqbirdsrv#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 137 | 138 | java -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xms128m -Xmx192m -XX:+UseG1GC -jar /opt/hqbird/dataguard.jar -config-directory=/opt/hqbird/conf -default-output-directory=/opt/hqbird/outdataguard/ > /dev/null & 139 | sleep 5 140 | java -jar /opt/hqbird/dataguard.jar -register -regemail="linuxauto@ib-aid.com" -regpaswd="L8ND44AD" -installid=/opt/hqbird/conf/installid.bin -unlock=/opt/hqbird/conf/unlock -license="M" 141 | sleep 5 142 | pkill -f dataguard.jar 143 | sleep 3 144 | 145 | echo Registering test database ================================================= 146 | 147 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 148 | cp -R /opt/hqbird/conf/.defaults/database3/* /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 149 | java -jar /opt/hqbird/dataguard.jar -regdb="/opt/firebird/examples/empbuild/employee.fdb" -srvver=3 -config-directory="/opt/hqbird/conf" -default-output-directory="/opt/hqbird/outdataguard" 150 | rm -rf /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 151 | 152 | sed -i 's/db.replication_role=.*/db.replication_role=switchedoff/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/database.properties 153 | sed -i 's/job.enabled.*/job.enabled=false/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/jobs/replmon/job.properties 154 | sed -i 's/^#\s*RemoteAuxPort.*$/RemoteAuxPort = 3059/g' /opt/firebird/firebird.conf 155 | #sed -i 's/ftpsrv.homedir=/ftpsrv.homedir=\/opt\/database/g' /opt/hqbird/conf/ftpsrv.properties 156 | sed -i 's/ftpsrv.passivePorts=40000-40005/ftpsrv.passivePorts=40000-40000/g' /opt/hqbird/conf/ftpsrv.properties 157 | chown -R firebird:firebird /opt/hqbird /opt/firebird/firebird.conf /opt/firebird/databases.conf 158 | 159 | echo Enabling HQbird services ================================================== 160 | # How much physical memory do we have? 161 | m=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') 162 | 163 | if [ "$m" -ge "$ENOUGH_MEM" ]; then 164 | echo "Enabling ALL HQbird services" # Enough memory 165 | svc_list="hqbird fbccamv fbcclauncher fbcctracehorse" 166 | else 167 | echo "Not enough memory to run all HQbird services" # Not enough memory 168 | echo "At least 8GB system memory required" 169 | echo "Enabling only core service" 170 | svc_list="hqbird" 171 | fi 172 | 173 | echo Restarting services ======================================================== 174 | systemctl stop firebird 175 | systemctl enable $svc_list 176 | systemctl restart $svc_list 177 | sleep 10 178 | systemctl restart firebird 179 | 180 | exit_script 0 181 | 182 | -------------------------------------------------------------------------------- /debian11/fb_vanilla_deb11-25.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/FirebirdCS-2.5.9.27139-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu67 wget unzip gettext libncurses5 curl tar tzdata locales sudo xz-utils file apt-transport-https gpg 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | locale-gen "en_US.UTF-8" 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 93 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 94 | 95 | exit_script 0 96 | 97 | -------------------------------------------------------------------------------- /debian11/fb_vanilla_deb11-30.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=3.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v3.0.12/Firebird-3.0.12.33787-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu67 wget unzip gettext libncurses5 curl tar tzdata locales sudo xz-utils file apt-transport-https gpg 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | locale-gen "en_US.UTF-8" 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | exit_script 0 95 | 96 | -------------------------------------------------------------------------------- /debian11/fb_vanilla_deb11-40.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=4.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v4.0.5/Firebird-4.0.5.3140-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu67 wget unzip gettext libncurses5 curl tar tzdata locales sudo xz-utils file apt-transport-https gpg 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | locale-gen "en_US.UTF-8" 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | exit_script 0 95 | 96 | -------------------------------------------------------------------------------- /debian11/fb_vanilla_deb11-50.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v5.0.1/Firebird-5.0.1.1469-0-linux-x64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu67 wget unzip gettext libncurses5 curl tar tzdata locales sudo xz-utils file apt-transport-https gpg libatomic1 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | locale-gen "en_US.UTF-8" 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | exit_script 0 95 | 96 | -------------------------------------------------------------------------------- /debian12/fb_vanilla_deb12-25.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/FirebirdCS-2.5.9.27139-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu72 wget unzip gettext libncurses5 curl tar tzdata locales sudo xz-utils file apt-transport-https gpg 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | locale-gen "en_US.UTF-8" 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 93 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 94 | 95 | exit_script 0 96 | 97 | -------------------------------------------------------------------------------- /debian12/fb_vanilla_deb12-30.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=3.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v3.0.12/Firebird-3.0.12.33787-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu72 wget unzip gettext libncurses5 curl tar tzdata locales sudo xz-utils file apt-transport-https gpg 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | locale-gen "en_US.UTF-8" 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | exit_script 0 95 | 96 | -------------------------------------------------------------------------------- /debian12/fb_vanilla_deb12-40.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=4.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v4.0.5/Firebird-4.0.5.3140-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu72 wget unzip gettext libncurses5 curl tar tzdata locales sudo xz-utils file apt-transport-https gpg 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | locale-gen "en_US.UTF-8" 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | exit_script 0 95 | 96 | -------------------------------------------------------------------------------- /debian12/fb_vanilla_deb12-50.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v5.0.1/Firebird-5.0.1.1469-0-linux-x64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu72 wget unzip gettext libncurses5 curl tar tzdata locales sudo xz-utils file apt-transport-https gpg libatomic1 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | locale-gen "en_US.UTF-8" 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | exit_script 0 95 | 96 | -------------------------------------------------------------------------------- /fb_hqbird_ub20-25.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FTP_URL="https://cc.ib-aid.com/download/distr" 9 | 10 | SYSCTL=/etc/sysctl.conf 11 | SYS_STR="vm.max_map_count" 12 | 13 | TMP_DIR=$(mktemp -d) 14 | OLD_DIR=$(pwd -P) 15 | ENOUGH_MEM=7168000 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu66 wget unzip gettext libncurses5 curl tar openjdk-8-jre tzdata locales sudo mc xz-utils file bsdmainutils 73 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 74 | locale-gen "en_US.UTF-8" 75 | 76 | ## Firebird & Hqbird download 77 | download_file $FTP_URL/$FB_VER/fb.tar.xz $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/conf.tar.xz $TMP_DIR "FB config files" 79 | download_file $FTP_URL/amvmon.tar.xz $TMP_DIR "AMV & MON installer" 80 | download_file $FTP_URL/distrib.tar.xz $TMP_DIR "DG installer" 81 | download_file $FTP_URL/hqbird.tar.xz $TMP_DIR "HQbird installer" 82 | 83 | echo Extracting FB installer ================================================== 84 | 85 | mkdir $TMP_DIR/fb $TMP_DIR/conf 86 | tar xvf $TMP_DIR/fb.tar.xz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 87 | tar xvf $TMP_DIR/conf.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 88 | cd $TMP_DIR/fb 89 | 90 | echo Running FB installer ===================================================== 91 | 92 | yes 'masterkey' | ./install.sh 93 | #./install.sh -silent 94 | cd $OLD_DIR 95 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 96 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 97 | service firebird stop 98 | sleep 5 99 | service firebird start 100 | 101 | echo Installing HQbird ======================================================== 102 | 103 | if [ ! -d /opt/hqbird ]; then 104 | echo "Creating directory /opt/hqbird" 105 | mkdir /opt/hqbird 106 | else 107 | echo "Directory /opt/hqbird already exists" 108 | fi 109 | 110 | tar xvf $TMP_DIR/amvmon.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking AMV archive" 111 | tar xvf $TMP_DIR/distrib.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking DG archive" 112 | tar xvf $TMP_DIR/hqbird.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking HQ archive" 113 | 114 | cp /opt/hqbird/amv/fbccamv.service /opt/hqbird/mon/init/systemd/fbcclauncher.service /opt/hqbird/mon/init/systemd/fbcctracehorse.service /opt/hqbird/init/systemd/hqbird.service /lib/systemd/system 115 | chmod -x /lib/systemd/system/fbcc*.service 116 | systemctl daemon-reload 117 | 118 | if [ ! -d /opt/hqbird/outdataguard ]; then 119 | echo "Creating directory /opt/hqbird/outdataguard" 120 | mkdir /opt/hqbird/outdataguard 121 | else 122 | echo "Directory /opt/hqbird/outdataguard already exists" 123 | fi 124 | echo "Running HQbird setup" 125 | sh /opt/hqbird/hqbird-setup 126 | rm -f /opt/firebird/plugins/libfbtrace2db.so 2 > /dev/null 127 | 128 | echo Registering HQbird ======================================================== 129 | 130 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv 131 | cp -R /opt/hqbird/conf/.defaults/server/* /opt/hqbird/conf/agent/servers/hqbirdsrv 132 | sed -i 's#server.installation =.*#server.installation=/opt/firebird#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 133 | sed -i 's#server.bin.*#server.bin = ${server.installation}/bin#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 134 | sed -i 's#server.id = .*#server.id = hqbirdsrv#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 135 | 136 | java -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xms128m -Xmx192m -XX:+UseG1GC -jar /opt/hqbird/dataguard.jar -config-directory=/opt/hqbird/conf -default-output-directory=/opt/hqbird/outdataguard/ > /dev/null & 137 | sleep 5 138 | java -jar /opt/hqbird/dataguard.jar -register -regemail="linuxauto@ib-aid.com" -regpaswd="L8ND44AD" -installid=/opt/hqbird/conf/installid.bin -unlock=/opt/hqbird/conf/unlock -license="M" 139 | sleep 5 140 | pkill -f dataguard.jar 141 | sleep 3 142 | 143 | echo Registering test database ================================================= 144 | 145 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 146 | cp -R /opt/hqbird/conf/.defaults/database2/* /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 147 | java -jar /opt/hqbird/dataguard.jar -regdb="/opt/firebird/examples/empbuild/employee.fdb" -srvver=3 -config-directory="/opt/hqbird/conf" -default-output-directory="/opt/hqbird/outdataguard" 148 | rm -rf /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 149 | 150 | sed -i 's/db.replication_role=.*/db.replication_role=switchedoff/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/database.properties 151 | sed -i 's/job.enabled.*/job.enabled=false/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/jobs/replmon/job.properties 152 | sed -i 's/^#\s*RemoteAuxPort.*$/RemoteAuxPort = 3059/g' /opt/firebird/firebird.conf 153 | #sed -i 's/ftpsrv.homedir=/ftpsrv.homedir=\/opt\/database/g' /opt/hqbird/conf/ftpsrv.properties 154 | sed -i 's/ftpsrv.passivePorts=40000-40005/ftpsrv.passivePorts=40000-40000/g' /opt/hqbird/conf/ftpsrv.properties 155 | chown -R firebird:firebird /opt/hqbird /opt/firebird/firebird.conf /opt/firebird/databases.conf 156 | 157 | echo Enabling HQbird services ================================================== 158 | # How much physical memory do we have? 159 | m=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') 160 | 161 | if [ "$m" -ge "$ENOUGH_MEM" ]; then 162 | echo "Enabling ALL HQbird services" # Enough memory 163 | svc_list="hqbird fbccamv fbcclauncher fbcctracehorse" 164 | else 165 | echo "Not enough memory to run all HQbird services" # Not enough memory 166 | echo "At least 8GB system memory required" 167 | echo "Enabling only core service" 168 | svc_list="hqbird" 169 | fi 170 | 171 | echo Restarting services ======================================================== 172 | service firebird stop 173 | systemctl enable $svc_list 174 | systemctl restart $svc_list 175 | sleep 10 176 | service firebird start 177 | 178 | exit_script 0 179 | 180 | -------------------------------------------------------------------------------- /oracle8/fb_vanilla_ol8-25.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/FirebirdCS-2.5.9.27139-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf update -y 72 | dnf install -y oracle-epel-release-el8 73 | dnf install -y tar wget mc ncurses-compat-libs libicu libtommath 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 93 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 94 | 95 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 96 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 97 | firewall-cmd --reload 98 | 99 | exit_script 0 100 | 101 | -------------------------------------------------------------------------------- /oracle8/fb_vanilla_ol8-30.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=3.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v3.0.12/Firebird-3.0.12.33787-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf update -y 72 | dnf install -y oracle-epel-release-el8 73 | dnf install -y tar wget mc ncurses-compat-libs libicu libtommath java-1.8.0-openjdk-headless 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 96 | firewall-cmd --reload 97 | 98 | exit_script 0 99 | 100 | -------------------------------------------------------------------------------- /oracle8/fb_vanilla_ol8-40.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=4.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v4.0.5/Firebird-4.0.5.3140-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf update -y 72 | dnf install -y oracle-epel-release-el8 73 | dnf install -y tar wget mc ncurses-compat-libs libicu libtommath 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 96 | firewall-cmd --reload 97 | 98 | exit_script 0 99 | 100 | -------------------------------------------------------------------------------- /oracle8/fb_vanilla_ol8-50.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v5.0.1/Firebird-5.0.1.1469-0-linux-x64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf update -y 72 | dnf install -y oracle-epel-release-el8 73 | dnf install -y tar wget mc ncurses-compat-libs libicu libtommath libatomic 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | #./install.sh -silent 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 96 | firewall-cmd --reload 97 | 98 | exit_script 0 99 | 100 | -------------------------------------------------------------------------------- /oracle9/fb_vanilla_ol9-25.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/FirebirdCS-2.5.9.27139-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf update -y 72 | dnf install -y oracle-epel-release-el9 73 | dnf install -y tar wget mc ncurses-compat-libs libicu libtommath 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | service firebird stop 94 | service firebird start 95 | 96 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 97 | firewall-cmd --reload 98 | 99 | exit_script 0 100 | 101 | -------------------------------------------------------------------------------- /oracle9/fb_vanilla_ol9-30.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=3.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v3.0.12/Firebird-3.0.12.33787-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf update -y 72 | dnf install -y oracle-epel-release-el9 73 | dnf install -y tar wget mc ncurses-compat-libs libicu libtommath 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 92 | 93 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 94 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 95 | firewall-cmd --reload 96 | 97 | exit_script 0 98 | 99 | -------------------------------------------------------------------------------- /oracle9/fb_vanilla_ol9-40.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=4.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v4.0.5/Firebird-4.0.5.3140-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf update -y 72 | dnf install -y oracle-epel-release-el9 73 | dnf install -y tar wget mc ncurses-compat-libs libicu libtommath 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 92 | 93 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 94 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 95 | firewall-cmd --reload 96 | 97 | exit_script 0 98 | 99 | -------------------------------------------------------------------------------- /oracle9/fb_vanilla_ol9-50.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v5.0.1/Firebird-5.0.1.1469-0-linux-x64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf update -y 72 | dnf install -y oracle-epel-release-el9 73 | dnf install -y tar wget mc ncurses-compat-libs libicu libtommath libatomic 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 92 | 93 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 94 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 95 | firewall-cmd --reload 96 | 97 | exit_script 0 98 | 99 | -------------------------------------------------------------------------------- /rockylinux8/fb_vanilla_rocky8-fb25.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/FirebirdCS-2.5.9.27139-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf -y update 72 | dnf -y install epel-release 73 | dnf -y install findutils libtommath libicu xz mc ncurses-libs ncurses-compat-libs 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --reload 96 | 97 | exit_script 0 98 | 99 | -------------------------------------------------------------------------------- /rockylinux8/fb_vanilla_rocky8-fb30.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=3.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v3.0.12/Firebird-3.0.12.33787-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf -y update 72 | dnf -y install epel-release 73 | dnf -y install findutils libtommath libicu xz mc ncurses-libs ncurses-compat-libs 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 92 | 93 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 94 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 95 | firewall-cmd --reload 96 | 97 | exit_script 0 98 | 99 | -------------------------------------------------------------------------------- /rockylinux8/fb_vanilla_rocky8-fb40.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=4.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v4.0.5/Firebird-4.0.5.3140-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf -y update 72 | dnf -y install epel-release 73 | dnf -y install findutils libtommath libicu xz mc ncurses-libs ncurses-compat-libs 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 92 | 93 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 94 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 95 | firewall-cmd --reload 96 | 97 | exit_script 0 98 | 99 | -------------------------------------------------------------------------------- /rockylinux8/fb_vanilla_rocky8-fb50.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v5.0.1/Firebird-5.0.1.1469-0-linux-x64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf -y update 72 | dnf -y install epel-release 73 | dnf -y install findutils libtommath libicu xz mc ncurses-libs ncurses-compat-libs libatomic 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 92 | 93 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 94 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 95 | firewall-cmd --reload 96 | 97 | exit_script 0 98 | 99 | -------------------------------------------------------------------------------- /rockylinux9/fb_vanilla_rocky9-25.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/FirebirdCS-2.5.9.27139-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf -y update 72 | dnf -y install epel-release 73 | dnf -y install findutils libtommath libicu xz mc ncurses-libs ncurses-compat-libs tar 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 95 | firewall-cmd --reload 96 | 97 | exit_script 0 98 | 99 | -------------------------------------------------------------------------------- /rockylinux9/fb_vanilla_rocky9-30.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=3.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v3.0.12/Firebird-3.0.12.33787-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf -y update 72 | dnf -y install epel-release 73 | dnf -y install findutils libtommath libicu xz mc ncurses-libs ncurses-compat-libs tar 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 92 | 93 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 94 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 95 | firewall-cmd --reload 96 | 97 | exit_script 0 98 | 99 | -------------------------------------------------------------------------------- /rockylinux9/fb_vanilla_rocky9-40.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=4.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v4.0.5/Firebird-4.0.5.3140-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf -y update 72 | dnf -y install epel-release 73 | dnf -y install findutils libtommath libicu xz mc ncurses-libs ncurses-compat-libs tar 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 92 | 93 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 94 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 95 | firewall-cmd --reload 96 | 97 | exit_script 0 98 | 99 | -------------------------------------------------------------------------------- /rockylinux9/fb_vanilla_rocky9-50.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v5.0.1/Firebird-5.0.1.1469-0-linux-x64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | dnf -y update 72 | dnf -y install epel-release 73 | dnf -y install findutils libtommath libicu xz mc ncurses-libs ncurses-compat-libs libatomic tar 74 | 75 | ln -s libtommath.so.1 /lib64/libtommath.so.0 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 92 | 93 | firewall-cmd --permanent --zone=public --add-port=3050/tcp # 4) FB RemoteServicePort 94 | firewall-cmd --permanent --zone=public --add-port=3059/tcp # 5) FB RemoteAuxPort 95 | firewall-cmd --reload 96 | 97 | exit_script 0 98 | 99 | -------------------------------------------------------------------------------- /ubuntu20/fb_hqbird_ub20-25.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FTP_URL="https://cc.ib-aid.com/download/distr" 9 | 10 | SYSCTL=/etc/sysctl.conf 11 | SYS_STR="vm.max_map_count" 12 | 13 | TMP_DIR=$(mktemp -d) 14 | OLD_DIR=$(pwd -P) 15 | ENOUGH_MEM=7168000 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu66 wget unzip gettext libncurses5 curl tar openjdk-8-jre tzdata locales sudo mc xz-utils file bsdmainutils 73 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 74 | locale-gen "en_US.UTF-8" 75 | 76 | ## Firebird & Hqbird download 77 | download_file $FTP_URL/$FB_VER/fb.tar.xz $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/conf.tar.xz $TMP_DIR "FB config files" 79 | download_file $FTP_URL/amvmon.tar.xz $TMP_DIR "AMV & MON installer" 80 | download_file $FTP_URL/distrib.tar.xz $TMP_DIR "DG installer" 81 | download_file $FTP_URL/hqbird.tar.xz $TMP_DIR "HQbird installer" 82 | 83 | echo Extracting FB installer ================================================== 84 | 85 | mkdir $TMP_DIR/fb $TMP_DIR/conf 86 | tar xvf $TMP_DIR/fb.tar.xz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 87 | tar xvf $TMP_DIR/conf.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 88 | cd $TMP_DIR/fb 89 | 90 | echo Running FB installer ===================================================== 91 | 92 | yes 'masterkey' | ./install.sh 93 | #./install.sh -silent 94 | cd $OLD_DIR 95 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 96 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 97 | service firebird stop 98 | sleep 5 99 | service firebird start 100 | 101 | echo Installing HQbird ======================================================== 102 | 103 | if [ ! -d /opt/hqbird ]; then 104 | echo "Creating directory /opt/hqbird" 105 | mkdir /opt/hqbird 106 | else 107 | echo "Directory /opt/hqbird already exists" 108 | fi 109 | 110 | tar xvf $TMP_DIR/amvmon.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking AMV archive" 111 | tar xvf $TMP_DIR/distrib.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking DG archive" 112 | tar xvf $TMP_DIR/hqbird.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking HQ archive" 113 | 114 | cp /opt/hqbird/amv/fbccamv.service /opt/hqbird/mon/init/systemd/fbcclauncher.service /opt/hqbird/mon/init/systemd/fbcctracehorse.service /opt/hqbird/init/systemd/hqbird.service /lib/systemd/system 115 | chmod -x /lib/systemd/system/fbcc*.service 116 | systemctl daemon-reload 117 | 118 | if [ ! -d /opt/hqbird/outdataguard ]; then 119 | echo "Creating directory /opt/hqbird/outdataguard" 120 | mkdir /opt/hqbird/outdataguard 121 | else 122 | echo "Directory /opt/hqbird/outdataguard already exists" 123 | fi 124 | echo "Running HQbird setup" 125 | sh /opt/hqbird/hqbird-setup 126 | rm -f /opt/firebird/plugins/libfbtrace2db.so 2 > /dev/null 127 | 128 | echo Registering HQbird ======================================================== 129 | 130 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv 131 | cp -R /opt/hqbird/conf/.defaults/server/* /opt/hqbird/conf/agent/servers/hqbirdsrv 132 | sed -i 's#server.installation =.*#server.installation=/opt/firebird#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 133 | sed -i 's#server.bin.*#server.bin = ${server.installation}/bin#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 134 | sed -i 's#server.id = .*#server.id = hqbirdsrv#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 135 | 136 | java -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xms128m -Xmx192m -XX:+UseG1GC -jar /opt/hqbird/dataguard.jar -config-directory=/opt/hqbird/conf -default-output-directory=/opt/hqbird/outdataguard/ > /dev/null & 137 | sleep 5 138 | java -jar /opt/hqbird/dataguard.jar -register -regemail="linuxauto@ib-aid.com" -regpaswd="L8ND44AD" -installid=/opt/hqbird/conf/installid.bin -unlock=/opt/hqbird/conf/unlock -license="T" 139 | sleep 5 140 | pkill -f dataguard.jar 141 | sleep 3 142 | 143 | echo Registering test database ================================================= 144 | 145 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 146 | cp -R /opt/hqbird/conf/.defaults/database2/* /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 147 | java -jar /opt/hqbird/dataguard.jar -regdb="/opt/firebird/examples/empbuild/employee.fdb" -srvver=3 -config-directory="/opt/hqbird/conf" -default-output-directory="/opt/hqbird/outdataguard" 148 | rm -rf /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 149 | 150 | sed -i 's/db.replication_role=.*/db.replication_role=switchedoff/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/database.properties 151 | sed -i 's/job.enabled.*/job.enabled=false/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/jobs/replmon/job.properties 152 | sed -i 's/^#\s*RemoteAuxPort.*$/RemoteAuxPort = 3059/g' /opt/firebird/firebird.conf 153 | #sed -i 's/ftpsrv.homedir=/ftpsrv.homedir=\/opt\/database/g' /opt/hqbird/conf/ftpsrv.properties 154 | sed -i 's/ftpsrv.passivePorts=40000-40005/ftpsrv.passivePorts=40000-40000/g' /opt/hqbird/conf/ftpsrv.properties 155 | chown -R firebird:firebird /opt/hqbird /opt/firebird/firebird.conf /opt/firebird/databases.conf 156 | 157 | echo Enabling HQbird services ================================================== 158 | # How much physical memory do we have? 159 | m=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') 160 | 161 | if [ "$m" -ge "$ENOUGH_MEM" ]; then 162 | echo "Enabling ALL HQbird services" # Enough memory 163 | svc_list="hqbird fbccamv fbcclauncher fbcctracehorse" 164 | else 165 | echo "Not enough memory to run all HQbird services" # Not enough memory 166 | echo "At least 8GB system memory required" 167 | echo "Enabling only core service" 168 | svc_list="hqbird" 169 | fi 170 | 171 | echo Restarting services ======================================================== 172 | service firebird stop 173 | systemctl enable $svc_list 174 | systemctl restart $svc_list 175 | sleep 10 176 | service firebird start 177 | 178 | exit_script 0 179 | 180 | -------------------------------------------------------------------------------- /ubuntu22/fb_hqbird_ub22-25.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FTP_URL="https://cc.ib-aid.com/download/distr" 9 | 10 | SYSCTL=/etc/sysctl.conf 11 | SYS_STR="vm.max_map_count" 12 | 13 | TMP_DIR=$(mktemp -d) 14 | OLD_DIR=$(pwd -P) 15 | ENOUGH_MEM=7168000 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu70 wget unzip gettext libncurses5 curl tar openjdk-8-jre tzdata locales sudo mc xz-utils file 73 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 74 | locale-gen "en_US.UTF-8" 75 | 76 | ## Firebird & Hqbird download 77 | download_file $FTP_URL/$FB_VER/fb.tar.xz $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/conf.tar.xz $TMP_DIR "FB config files" 79 | download_file $FTP_URL/amvmon.tar.xz $TMP_DIR "AMV & MON installer" 80 | download_file $FTP_URL/distrib.tar.xz $TMP_DIR "DG installer" 81 | download_file $FTP_URL/hqbird.tar.xz $TMP_DIR "HQbird installer" 82 | 83 | echo Extracting FB installer ================================================== 84 | 85 | mkdir $TMP_DIR/fb $TMP_DIR/conf 86 | tar xvf $TMP_DIR/fb.tar.xz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 87 | tar xvf $TMP_DIR/conf.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 88 | cd $TMP_DIR/fb 89 | 90 | echo Running FB installer ===================================================== 91 | 92 | yes 'masterkey' | ./install.sh 93 | #./install.sh -silent 94 | cd $OLD_DIR 95 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 96 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 97 | service firebird stop 98 | sleep 5 99 | service firebird start 100 | 101 | echo Installing HQbird ======================================================== 102 | 103 | if [ ! -d /opt/hqbird ]; then 104 | echo "Creating directory /opt/hqbird" 105 | mkdir /opt/hqbird 106 | else 107 | echo "Directory /opt/hqbird already exists" 108 | fi 109 | 110 | tar xvf $TMP_DIR/amvmon.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking AMV archive" 111 | tar xvf $TMP_DIR/distrib.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking DG archive" 112 | tar xvf $TMP_DIR/hqbird.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking HQ archive" 113 | 114 | cp /opt/hqbird/amv/fbccamv.service /opt/hqbird/mon/init/systemd/fbcclauncher.service /opt/hqbird/mon/init/systemd/fbcctracehorse.service /opt/hqbird/init/systemd/hqbird.service /lib/systemd/system 115 | chmod -x /lib/systemd/system/fbcc*.service 116 | systemctl daemon-reload 117 | 118 | if [ ! -d /opt/hqbird/outdataguard ]; then 119 | echo "Creating directory /opt/hqbird/outdataguard" 120 | mkdir /opt/hqbird/outdataguard 121 | else 122 | echo "Directory /opt/hqbird/outdataguard already exists" 123 | fi 124 | echo "Running HQbird setup" 125 | sh /opt/hqbird/hqbird-setup 126 | rm -f /opt/firebird/plugins/libfbtrace2db.so 2 > /dev/null 127 | 128 | echo Registering HQbird ======================================================== 129 | 130 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv 131 | cp -R /opt/hqbird/conf/.defaults/server/* /opt/hqbird/conf/agent/servers/hqbirdsrv 132 | sed -i 's#server.installation =.*#server.installation=/opt/firebird#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 133 | sed -i 's#server.bin.*#server.bin = ${server.installation}/bin#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 134 | sed -i 's#server.id = .*#server.id = hqbirdsrv#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 135 | 136 | java -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xms128m -Xmx192m -XX:+UseG1GC -jar /opt/hqbird/dataguard.jar -config-directory=/opt/hqbird/conf -default-output-directory=/opt/hqbird/outdataguard/ > /dev/null & 137 | sleep 5 138 | java -jar /opt/hqbird/dataguard.jar -register -regemail="linuxauto@ib-aid.com" -regpaswd="L8ND44AD" -installid=/opt/hqbird/conf/installid.bin -unlock=/opt/hqbird/conf/unlock -license="M" 139 | sleep 5 140 | pkill -f dataguard.jar 141 | sleep 3 142 | 143 | echo Registering test database ================================================= 144 | 145 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 146 | cp -R /opt/hqbird/conf/.defaults/database2/* /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 147 | java -jar /opt/hqbird/dataguard.jar -regdb="/opt/firebird/examples/empbuild/employee.fdb" -srvver=3 -config-directory="/opt/hqbird/conf" -default-output-directory="/opt/hqbird/outdataguard" 148 | rm -rf /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 149 | 150 | sed -i 's/db.replication_role=.*/db.replication_role=switchedoff/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/database.properties 151 | sed -i 's/job.enabled.*/job.enabled=false/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/jobs/replmon/job.properties 152 | sed -i 's/^#\s*RemoteAuxPort.*$/RemoteAuxPort = 3059/g' /opt/firebird/firebird.conf 153 | #sed -i 's/ftpsrv.homedir=/ftpsrv.homedir=\/opt\/database/g' /opt/hqbird/conf/ftpsrv.properties 154 | sed -i 's/ftpsrv.passivePorts=40000-40005/ftpsrv.passivePorts=40000-40000/g' /opt/hqbird/conf/ftpsrv.properties 155 | chown -R firebird:firebird /opt/hqbird /opt/firebird/firebird.conf /opt/firebird/databases.conf 156 | 157 | echo Enabling HQbird services ================================================== 158 | # How much physical memory do we have? 159 | m=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') 160 | 161 | if [ "$m" -ge "$ENOUGH_MEM" ]; then 162 | echo "Enabling ALL HQbird services" # Enough memory 163 | svc_list="hqbird fbccamv fbcclauncher fbcctracehorse" 164 | else 165 | echo "Not enough memory to run all HQbird services" # Not enough memory 166 | echo "At least 8GB system memory required" 167 | echo "Enabling only core service" 168 | svc_list="hqbird" 169 | fi 170 | 171 | echo Restarting services ======================================================== 172 | service firebird stop 173 | systemctl enable $svc_list 174 | systemctl restart $svc_list 175 | sleep 10 176 | service firebird start 177 | 178 | exit_script 0 179 | 180 | -------------------------------------------------------------------------------- /ubuntu22/fb_hqbird_ub22-30.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=3.0 8 | FTP_URL="https://cc.ib-aid.com/download/distr" 9 | 10 | SYSCTL=/etc/sysctl.conf 11 | SYS_STR="vm.max_map_count" 12 | 13 | TMP_DIR=$(mktemp -d) 14 | OLD_DIR=$(pwd -P) 15 | ENOUGH_MEM=7168000 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu70 wget unzip gettext libncurses5 curl tar openjdk-8-jre tzdata locales sudo mc xz-utils file 73 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 74 | locale-gen "en_US.UTF-8" 75 | 76 | ## Firebird & Hqbird download 77 | download_file $FTP_URL/$FB_VER/fb.tar.xz $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/conf.tar.xz $TMP_DIR "FB config files" 79 | download_file $FTP_URL/amvmon.tar.xz $TMP_DIR "AMV & MON installer" 80 | download_file $FTP_URL/distrib.tar.xz $TMP_DIR "DG installer" 81 | download_file $FTP_URL/hqbird.tar.xz $TMP_DIR "HQbird installer" 82 | 83 | echo Extracting FB installer ================================================== 84 | 85 | mkdir $TMP_DIR/fb $TMP_DIR/conf 86 | tar xvf $TMP_DIR/fb.tar.xz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 87 | tar xvf $TMP_DIR/conf.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 88 | cd $TMP_DIR/fb 89 | 90 | echo Running FB installer ===================================================== 91 | 92 | yes 'masterkey' | ./install.sh 93 | #./install.sh -silent 94 | cd $OLD_DIR 95 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 96 | 97 | echo Installing HQbird ======================================================== 98 | 99 | if [ ! -d /opt/hqbird ]; then 100 | echo "Creating directory /opt/hqbird" 101 | mkdir /opt/hqbird 102 | else 103 | echo "Directory /opt/hqbird already exists" 104 | fi 105 | 106 | tar xvf $TMP_DIR/amvmon.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking AMV archive" 107 | tar xvf $TMP_DIR/distrib.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking DG archive" 108 | tar xvf $TMP_DIR/hqbird.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking HQ archive" 109 | 110 | cp /opt/hqbird/amv/fbccamv.service /opt/hqbird/mon/init/systemd/fbcclauncher.service /opt/hqbird/mon/init/systemd/fbcctracehorse.service /opt/hqbird/init/systemd/hqbird.service /lib/systemd/system 111 | chmod -x /lib/systemd/system/fbcc*.service 112 | systemctl daemon-reload 113 | 114 | if [ ! -d /opt/hqbird/outdataguard ]; then 115 | echo "Creating directory /opt/hqbird/outdataguard" 116 | mkdir /opt/hqbird/outdataguard 117 | else 118 | echo "Directory /opt/hqbird/outdataguard already exists" 119 | fi 120 | echo "Running HQbird setup" 121 | sh /opt/hqbird/hqbird-setup 122 | rm -f /opt/firebird/plugins/libfbtrace2db.so 2 > /dev/null 123 | 124 | echo Registering HQbird ======================================================== 125 | 126 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv 127 | cp -R /opt/hqbird/conf/.defaults/server/* /opt/hqbird/conf/agent/servers/hqbirdsrv 128 | sed -i 's#server.installation =.*#server.installation=/opt/firebird#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 129 | sed -i 's#server.bin.*#server.bin = ${server.installation}/bin#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 130 | sed -i 's#server.id = .*#server.id = hqbirdsrv#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 131 | 132 | java -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xms128m -Xmx192m -XX:+UseG1GC -jar /opt/hqbird/dataguard.jar -config-directory=/opt/hqbird/conf -default-output-directory=/opt/hqbird/outdataguard/ > /dev/null & 133 | sleep 5 134 | java -jar /opt/hqbird/dataguard.jar -register -regemail="linuxauto@ib-aid.com" -regpaswd="L8ND44AD" -installid=/opt/hqbird/conf/installid.bin -unlock=/opt/hqbird/conf/unlock -license="M" 135 | sleep 5 136 | pkill -f dataguard.jar 137 | sleep 3 138 | 139 | echo Registering test database ================================================= 140 | 141 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 142 | cp -R /opt/hqbird/conf/.defaults/database3/* /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 143 | java -jar /opt/hqbird/dataguard.jar -regdb="/opt/firebird/examples/empbuild/employee.fdb" -srvver=3 -config-directory="/opt/hqbird/conf" -default-output-directory="/opt/hqbird/outdataguard" 144 | rm -rf /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 145 | 146 | sed -i 's/db.replication_role=.*/db.replication_role=switchedoff/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/database.properties 147 | sed -i 's/job.enabled.*/job.enabled=false/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/jobs/replmon/job.properties 148 | sed -i 's/^#\s*RemoteAuxPort.*$/RemoteAuxPort = 3059/g' /opt/firebird/firebird.conf 149 | #sed -i 's/ftpsrv.homedir=/ftpsrv.homedir=\/opt\/database/g' /opt/hqbird/conf/ftpsrv.properties 150 | sed -i 's/ftpsrv.passivePorts=40000-40005/ftpsrv.passivePorts=40000-40000/g' /opt/hqbird/conf/ftpsrv.properties 151 | chown -R firebird:firebird /opt/hqbird /opt/firebird/firebird.conf /opt/firebird/databases.conf 152 | 153 | echo Enabling HQbird services ================================================== 154 | # How much physical memory do we have? 155 | m=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') 156 | 157 | if [ "$m" -ge "$ENOUGH_MEM" ]; then 158 | echo "Enabling ALL HQbird services" # Enough memory 159 | svc_list="hqbird fbccamv fbcclauncher fbcctracehorse" 160 | else 161 | echo "Not enough memory to run all HQbird services" # Not enough memory 162 | echo "At least 8GB system memory required" 163 | echo "Enabling only core service" 164 | svc_list="hqbird" 165 | fi 166 | 167 | echo Restarting services ======================================================== 168 | systemctl stop firebird-superserver 169 | systemctl enable $svc_list 170 | systemctl restart $svc_list 171 | sleep 15 172 | systemctl restart firebird-superserver 173 | 174 | exit_script 0 175 | 176 | -------------------------------------------------------------------------------- /ubuntu22/fb_hqbird_ub22-40.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=4.0 8 | FTP_URL="https://cc.ib-aid.com/download/distr" 9 | 10 | SYSCTL=/etc/sysctl.conf 11 | SYS_STR="vm.max_map_count" 12 | 13 | TMP_DIR=$(mktemp -d) 14 | OLD_DIR=$(pwd -P) 15 | ENOUGH_MEM=7168000 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu70 wget unzip gettext libncurses5 curl tar openjdk-8-jre tzdata locales sudo mc xz-utils file 73 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 74 | locale-gen "en_US.UTF-8" 75 | 76 | ## Firebird & Hqbird download 77 | download_file $FTP_URL/$FB_VER/fb.tar.xz $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/conf.tar.xz $TMP_DIR "FB config files" 79 | download_file $FTP_URL/amvmon.tar.xz $TMP_DIR "AMV & MON installer" 80 | download_file $FTP_URL/distrib.tar.xz $TMP_DIR "DG installer" 81 | download_file $FTP_URL/hqbird.tar.xz $TMP_DIR "HQbird installer" 82 | 83 | echo Extracting FB installer ================================================== 84 | 85 | mkdir $TMP_DIR/fb $TMP_DIR/conf 86 | tar xvf $TMP_DIR/fb.tar.xz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 87 | tar xvf $TMP_DIR/conf.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 88 | cd $TMP_DIR/fb 89 | 90 | echo Running FB installer ===================================================== 91 | 92 | yes 'masterkey' | ./install.sh 93 | #./install.sh -silent 94 | cd $OLD_DIR 95 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 96 | 97 | echo Installing HQbird ======================================================== 98 | 99 | if [ ! -d /opt/hqbird ]; then 100 | echo "Creating directory /opt/hqbird" 101 | mkdir /opt/hqbird 102 | else 103 | echo "Directory /opt/hqbird already exists" 104 | fi 105 | 106 | tar xvf $TMP_DIR/amvmon.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking AMV archive" 107 | tar xvf $TMP_DIR/distrib.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking DG archive" 108 | tar xvf $TMP_DIR/hqbird.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking HQ archive" 109 | 110 | cp /opt/hqbird/amv/fbccamv.service /opt/hqbird/mon/init/systemd/fbcclauncher.service /opt/hqbird/mon/init/systemd/fbcctracehorse.service /opt/hqbird/init/systemd/hqbird.service /lib/systemd/system 111 | chmod -x /lib/systemd/system/fbcc*.service 112 | systemctl daemon-reload 113 | 114 | if [ ! -d /opt/hqbird/outdataguard ]; then 115 | echo "Creating directory /opt/hqbird/outdataguard" 116 | mkdir /opt/hqbird/outdataguard 117 | else 118 | echo "Directory /opt/hqbird/outdataguard already exists" 119 | fi 120 | echo "Running HQbird setup" 121 | sh /opt/hqbird/hqbird-setup 122 | rm -f /opt/firebird/plugins/libfbtrace2db.so 2 > /dev/null 123 | 124 | echo Registering HQbird ======================================================== 125 | 126 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv 127 | cp -R /opt/hqbird/conf/.defaults/server/* /opt/hqbird/conf/agent/servers/hqbirdsrv 128 | sed -i 's#server.installation =.*#server.installation=/opt/firebird#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 129 | sed -i 's#server.bin.*#server.bin = ${server.installation}/bin#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 130 | sed -i 's#server.id = .*#server.id = hqbirdsrv#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 131 | 132 | java -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xms128m -Xmx192m -XX:+UseG1GC -jar /opt/hqbird/dataguard.jar -config-directory=/opt/hqbird/conf -default-output-directory=/opt/hqbird/outdataguard/ > /dev/null & 133 | sleep 5 134 | java -jar /opt/hqbird/dataguard.jar -register -regemail="linuxauto@ib-aid.com" -regpaswd="L8ND44AD" -installid=/opt/hqbird/conf/installid.bin -unlock=/opt/hqbird/conf/unlock -license="M" 135 | sleep 5 136 | pkill -f dataguard.jar 137 | sleep 3 138 | 139 | echo Registering test database ================================================= 140 | 141 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 142 | cp -R /opt/hqbird/conf/.defaults/database4/* /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 143 | java -jar /opt/hqbird/dataguard.jar -regdb="/opt/firebird/examples/empbuild/employee.fdb" -srvver=3 -config-directory="/opt/hqbird/conf" -default-output-directory="/opt/hqbird/outdataguard" 144 | rm -rf /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 145 | 146 | sed -i 's/db.replication_role=.*/db.replication_role=switchedoff/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/database.properties 147 | sed -i 's/job.enabled.*/job.enabled=false/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/jobs/replmon/job.properties 148 | sed -i 's/^#\s*RemoteAuxPort.*$/RemoteAuxPort = 3059/g' /opt/firebird/firebird.conf 149 | #sed -i 's/ftpsrv.homedir=/ftpsrv.homedir=\/opt\/database/g' /opt/hqbird/conf/ftpsrv.properties 150 | sed -i 's/ftpsrv.passivePorts=40000-40005/ftpsrv.passivePorts=40000-40000/g' /opt/hqbird/conf/ftpsrv.properties 151 | chown -R firebird:firebird /opt/hqbird /opt/firebird/firebird.conf /opt/firebird/databases.conf 152 | 153 | echo Enabling HQbird services ================================================== 154 | # How much physical memory do we have? 155 | m=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') 156 | 157 | if [ "$m" -ge "$ENOUGH_MEM" ]; then 158 | echo "Enabling ALL HQbird services" # Enough memory 159 | svc_list="hqbird fbccamv fbcclauncher fbcctracehorse" 160 | else 161 | echo "Not enough memory to run all HQbird services" # Not enough memory 162 | echo "At least 8GB system memory required" 163 | echo "Enabling only core service" 164 | svc_list="hqbird" 165 | fi 166 | 167 | echo Restarting services ======================================================== 168 | systemctl stop firebird 169 | systemctl enable $svc_list 170 | systemctl restart $svc_list 171 | sleep 10 172 | systemctl restart firebird 173 | 174 | exit_script 0 175 | 176 | -------------------------------------------------------------------------------- /ubuntu22/fb_hqbird_ub22-50.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FTP_URL="https://cc.ib-aid.com/download/distr" 9 | 10 | SYSCTL=/etc/sysctl.conf 11 | SYS_STR="vm.max_map_count" 12 | 13 | TMP_DIR=$(mktemp -d) 14 | OLD_DIR=$(pwd -P) 15 | ENOUGH_MEM=7168000 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu70 wget unzip gettext libncurses5 curl tar openjdk-8-jre tzdata locales sudo mc xz-utils file libatomic1 73 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 74 | locale-gen "en_US.UTF-8" 75 | 76 | ## Firebird & Hqbird download 77 | download_file $FTP_URL/$FB_VER/fb.tar.xz $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/conf.tar.xz $TMP_DIR "FB config files" 79 | download_file $FTP_URL/amvmon.tar.xz $TMP_DIR "AMV & MON installer" 80 | download_file $FTP_URL/distrib.tar.xz $TMP_DIR "DG installer" 81 | download_file $FTP_URL/hqbird.tar.xz $TMP_DIR "HQbird installer" 82 | 83 | echo Extracting FB installer ================================================== 84 | 85 | mkdir $TMP_DIR/fb $TMP_DIR/conf 86 | tar xvf $TMP_DIR/fb.tar.xz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 87 | tar xvf $TMP_DIR/conf.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 88 | cd $TMP_DIR/fb 89 | 90 | echo Running FB installer ===================================================== 91 | 92 | yes 'masterkey' | ./install.sh 93 | #./install.sh -silent 94 | cd $OLD_DIR 95 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 96 | 97 | echo Installing HQbird ======================================================== 98 | 99 | if [ ! -d /opt/hqbird ]; then 100 | echo "Creating directory /opt/hqbird" 101 | mkdir /opt/hqbird 102 | else 103 | echo "Directory /opt/hqbird already exists" 104 | fi 105 | 106 | tar xvf $TMP_DIR/amvmon.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking AMV archive" 107 | tar xvf $TMP_DIR/distrib.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking DG archive" 108 | tar xvf $TMP_DIR/hqbird.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking HQ archive" 109 | 110 | cp /opt/hqbird/amv/fbccamv.service /opt/hqbird/mon/init/systemd/fbcclauncher.service /opt/hqbird/mon/init/systemd/fbcctracehorse.service /opt/hqbird/init/systemd/hqbird.service /lib/systemd/system 111 | chmod -x /lib/systemd/system/fbcc*.service 112 | systemctl daemon-reload 113 | 114 | if [ ! -d /opt/hqbird/outdataguard ]; then 115 | echo "Creating directory /opt/hqbird/outdataguard" 116 | mkdir /opt/hqbird/outdataguard 117 | else 118 | echo "Directory /opt/hqbird/outdataguard already exists" 119 | fi 120 | echo "Running HQbird setup" 121 | sh /opt/hqbird/hqbird-setup 122 | rm -f /opt/firebird/plugins/libfbtrace2db.so 2 > /dev/null 123 | 124 | echo Registering HQbird ======================================================== 125 | 126 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv 127 | cp -R /opt/hqbird/conf/.defaults/server/* /opt/hqbird/conf/agent/servers/hqbirdsrv 128 | sed -i 's#server.installation =.*#server.installation=/opt/firebird#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 129 | sed -i 's#server.bin.*#server.bin = ${server.installation}/bin#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 130 | sed -i 's#server.id = .*#server.id = hqbirdsrv#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 131 | 132 | java -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xms128m -Xmx192m -XX:+UseG1GC -jar /opt/hqbird/dataguard.jar -config-directory=/opt/hqbird/conf -default-output-directory=/opt/hqbird/outdataguard/ > /dev/null & 133 | sleep 5 134 | java -jar /opt/hqbird/dataguard.jar -register -regemail="linuxauto@ib-aid.com" -regpaswd="L8ND44AD" -installid=/opt/hqbird/conf/installid.bin -unlock=/opt/hqbird/conf/unlock -license="M" 135 | sleep 5 136 | pkill -f dataguard.jar 137 | sleep 3 138 | 139 | echo Registering test database ================================================= 140 | 141 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 142 | cp -R /opt/hqbird/conf/.defaults/database5/* /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 143 | java -jar /opt/hqbird/dataguard.jar -regdb="/opt/firebird/examples/empbuild/employee.fdb" -srvver=3 -config-directory="/opt/hqbird/conf" -default-output-directory="/opt/hqbird/outdataguard" 144 | rm -rf /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 145 | 146 | sed -i 's/db.replication_role=.*/db.replication_role=switchedoff/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/database.properties 147 | sed -i 's/job.enabled.*/job.enabled=false/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/jobs/replmon/job.properties 148 | sed -i 's/^#\s*RemoteAuxPort.*$/RemoteAuxPort = 3059/g' /opt/firebird/firebird.conf 149 | #sed -i 's/ftpsrv.homedir=/ftpsrv.homedir=\/opt\/database/g' /opt/hqbird/conf/ftpsrv.properties 150 | sed -i 's/ftpsrv.passivePorts=40000-40005/ftpsrv.passivePorts=40000-40000/g' /opt/hqbird/conf/ftpsrv.properties 151 | chown -R firebird:firebird /opt/hqbird /opt/firebird/firebird.conf /opt/firebird/databases.conf 152 | 153 | echo Enabling HQbird services ================================================== 154 | # How much physical memory do we have? 155 | m=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') 156 | 157 | if [ "$m" -ge "$ENOUGH_MEM" ]; then 158 | echo "Enabling ALL HQbird services" # Enough memory 159 | svc_list="hqbird fbccamv fbcclauncher fbcctracehorse" 160 | else 161 | echo "Not enough memory to run all HQbird services" # Not enough memory 162 | echo "At least 8GB system memory required" 163 | echo "Enabling only core service" 164 | svc_list="hqbird" 165 | fi 166 | 167 | echo Restarting services ======================================================== 168 | systemctl stop firebird 169 | systemctl enable $svc_list 170 | systemctl restart $svc_list 171 | sleep 10 172 | systemctl restart firebird 173 | 174 | exit_script 0 175 | 176 | -------------------------------------------------------------------------------- /ubuntu22/fb_vanilla_ub22-25.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/FirebirdCS-2.5.9.27139-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu70 wget unzip gettext libncurses5 curl tar tzdata locales sudo mc xz-utils file 73 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 74 | locale-gen "en_US.UTF-8" 75 | 76 | download_file $FB_URL $TMP_DIR "FB installer" 77 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 78 | 79 | echo Extracting FB installer ================================================== 80 | 81 | mkdir $TMP_DIR/fb $TMP_DIR/conf 82 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 83 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 84 | cd $TMP_DIR/fb 85 | 86 | echo Running FB installer ===================================================== 87 | 88 | yes 'masterkey' | ./install.sh 89 | cd $OLD_DIR 90 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 91 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 92 | 93 | service firebird stop 94 | sleep 5 95 | service firebird start 96 | 97 | exit_script 0 98 | 99 | -------------------------------------------------------------------------------- /ubuntu22/fb_vanilla_ub22-30.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=3.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v3.0.12/Firebird-3.0.12.33787-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu70 wget unzip gettext libncurses5 curl tar tzdata locales sudo mc xz-utils file 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | locale-gen "en_US.UTF-8" 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 92 | 93 | exit_script 0 94 | 95 | -------------------------------------------------------------------------------- /ubuntu22/fb_vanilla_ub22-40.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=4.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v4.0.5/Firebird-4.0.5.3140-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu70 wget unzip gettext libncurses5 curl tar tzdata locales sudo xz-utils file 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | locale-gen "en_US.UTF-8" 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 92 | 93 | exit_script 0 94 | 95 | -------------------------------------------------------------------------------- /ubuntu22/fb_vanilla_ub22-50.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v5.0.1/Firebird-5.0.1.1469-0-linux-x64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y net-tools libtommath1 libicu70 wget unzip gettext libncurses5 curl tar tzdata locales sudo xz-utils file libatomic1 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | locale-gen "en_US.UTF-8" 76 | 77 | download_file $FB_URL $TMP_DIR "FB installer" 78 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 79 | 80 | echo Extracting FB installer ================================================== 81 | 82 | mkdir $TMP_DIR/fb $TMP_DIR/conf 83 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 84 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 85 | cd $TMP_DIR/fb 86 | 87 | echo Running FB installer ===================================================== 88 | 89 | yes 'masterkey' | ./install.sh 90 | cd $OLD_DIR 91 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 92 | 93 | exit_script 0 94 | 95 | -------------------------------------------------------------------------------- /ubuntu24/fb_hqbird_ub24-25.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FTP_URL="https://cc.ib-aid.com/download/distr" 9 | 10 | SYSCTL=/etc/sysctl.conf 11 | SYS_STR="vm.max_map_count" 12 | 13 | TMP_DIR=$(mktemp -d) 14 | OLD_DIR=$(pwd -P) 15 | ENOUGH_MEM=7168000 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y ca-certificates net-tools wget unzip gettext libncurses6 curl tar tzdata locales sudo mc xz-utils file libtommath1 libicu74 openjdk-8-jre 73 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 74 | ln -s libncurses.so.6 /usr/lib/x86_64-linux-gnu/libncurses.so.5 75 | locale-gen "en_US.UTF-8" 76 | 77 | ## Firebird & Hqbird download 78 | download_file $FTP_URL/$FB_VER/fb.tar.xz $TMP_DIR "FB installer" 79 | download_file $FTP_URL/$FB_VER/conf.tar.xz $TMP_DIR "FB config files" 80 | download_file $FTP_URL/amvmon.tar.xz $TMP_DIR "AMV & MON installer" 81 | download_file $FTP_URL/distrib.tar.xz $TMP_DIR "DG installer" 82 | download_file $FTP_URL/hqbird.tar.xz $TMP_DIR "HQbird installer" 83 | 84 | echo Extracting FB installer ================================================== 85 | 86 | mkdir $TMP_DIR/fb $TMP_DIR/conf 87 | tar xvf $TMP_DIR/fb.tar.xz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 88 | tar xvf $TMP_DIR/conf.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 89 | cd $TMP_DIR/fb 90 | 91 | echo Running FB installer ===================================================== 92 | 93 | yes 'masterkey' | ./install.sh 94 | #./install.sh -silent 95 | cd $OLD_DIR 96 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 97 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 98 | service firebird stop 99 | sleep 5 100 | service firebird start 101 | 102 | echo Installing HQbird ======================================================== 103 | 104 | if [ ! -d /opt/hqbird ]; then 105 | echo "Creating directory /opt/hqbird" 106 | mkdir /opt/hqbird 107 | else 108 | echo "Directory /opt/hqbird already exists" 109 | fi 110 | 111 | tar xvf $TMP_DIR/amvmon.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking AMV archive" 112 | tar xvf $TMP_DIR/distrib.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking DG archive" 113 | tar xvf $TMP_DIR/hqbird.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking HQ archive" 114 | 115 | cp /opt/hqbird/amv/fbccamv.service /opt/hqbird/mon/init/systemd/fbcclauncher.service /opt/hqbird/mon/init/systemd/fbcctracehorse.service /opt/hqbird/init/systemd/hqbird.service /lib/systemd/system 116 | chmod -x /lib/systemd/system/fbcc*.service 117 | systemctl daemon-reload 118 | 119 | if [ ! -d /opt/hqbird/outdataguard ]; then 120 | echo "Creating directory /opt/hqbird/outdataguard" 121 | mkdir /opt/hqbird/outdataguard 122 | else 123 | echo "Directory /opt/hqbird/outdataguard already exists" 124 | fi 125 | echo "Running HQbird setup" 126 | sh /opt/hqbird/hqbird-setup 127 | rm -f /opt/firebird/plugins/libfbtrace2db.so 2 > /dev/null 128 | 129 | echo Registering HQbird ======================================================== 130 | 131 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv 132 | cp -R /opt/hqbird/conf/.defaults/server/* /opt/hqbird/conf/agent/servers/hqbirdsrv 133 | sed -i 's#server.installation =.*#server.installation=/opt/firebird#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 134 | sed -i 's#server.bin.*#server.bin = ${server.installation}/bin#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 135 | sed -i 's#server.id = .*#server.id = hqbirdsrv#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 136 | 137 | java -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xms128m -Xmx192m -XX:+UseG1GC -jar /opt/hqbird/dataguard.jar -config-directory=/opt/hqbird/conf -default-output-directory=/opt/hqbird/outdataguard/ > /dev/null & 138 | sleep 5 139 | java -jar /opt/hqbird/dataguard.jar -register -regemail="linuxauto@ib-aid.com" -regpaswd="L8ND44AD" -installid=/opt/hqbird/conf/installid.bin -unlock=/opt/hqbird/conf/unlock -license="M" 140 | sleep 5 141 | pkill -f dataguard.jar 142 | sleep 3 143 | 144 | echo Registering test database ================================================= 145 | 146 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 147 | cp -R /opt/hqbird/conf/.defaults/database2/* /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 148 | java -jar /opt/hqbird/dataguard.jar -regdb="/opt/firebird/examples/empbuild/employee.fdb" -srvver=3 -config-directory="/opt/hqbird/conf" -default-output-directory="/opt/hqbird/outdataguard" 149 | rm -rf /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 150 | 151 | sed -i 's/db.replication_role=.*/db.replication_role=switchedoff/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/database.properties 152 | sed -i 's/job.enabled.*/job.enabled=false/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/jobs/replmon/job.properties 153 | sed -i 's/^#\s*RemoteAuxPort.*$/RemoteAuxPort = 3059/g' /opt/firebird/firebird.conf 154 | #sed -i 's/ftpsrv.homedir=/ftpsrv.homedir=\/opt\/database/g' /opt/hqbird/conf/ftpsrv.properties 155 | sed -i 's/ftpsrv.passivePorts=40000-40005/ftpsrv.passivePorts=40000-40000/g' /opt/hqbird/conf/ftpsrv.properties 156 | chown -R firebird:firebird /opt/hqbird /opt/firebird/firebird.conf /opt/firebird/databases.conf 157 | 158 | echo Enabling HQbird services ================================================== 159 | # How much physical memory do we have? 160 | m=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') 161 | 162 | if [ "$m" -ge "$ENOUGH_MEM" ]; then 163 | echo "Enabling ALL HQbird services" # Enough memory 164 | svc_list="hqbird fbccamv fbcclauncher fbcctracehorse" 165 | else 166 | echo "Not enough memory to run all HQbird services" # Not enough memory 167 | echo "At least 8GB system memory required" 168 | echo "Enabling only core service" 169 | svc_list="hqbird" 170 | fi 171 | 172 | echo Restarting services ======================================================== 173 | service firebird stop 174 | systemctl enable $svc_list 175 | systemctl restart $svc_list 176 | sleep 10 177 | service firebird start 178 | 179 | exit_script 0 180 | -------------------------------------------------------------------------------- /ubuntu24/fb_hqbird_ub24-30.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=3.0 8 | FTP_URL="https://cc.ib-aid.com/download/distr" 9 | 10 | SYSCTL=/etc/sysctl.conf 11 | SYS_STR="vm.max_map_count" 12 | 13 | TMP_DIR=$(mktemp -d) 14 | OLD_DIR=$(pwd -P) 15 | ENOUGH_MEM=7168000 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y ca-certificates net-tools wget unzip gettext libncurses6 curl tar tzdata locales sudo mc xz-utils file libtommath1 libicu74 openjdk-8-jre 73 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 74 | ln -s libncurses.so.6 /usr/lib/x86_64-linux-gnu/libncurses.so.5 75 | locale-gen "en_US.UTF-8" 76 | 77 | ## Firebird & Hqbird download 78 | download_file $FTP_URL/$FB_VER/fb.tar.xz $TMP_DIR "FB installer" 79 | download_file $FTP_URL/$FB_VER/conf.tar.xz $TMP_DIR "FB config files" 80 | download_file $FTP_URL/amvmon.tar.xz $TMP_DIR "AMV & MON installer" 81 | download_file $FTP_URL/distrib.tar.xz $TMP_DIR "DG installer" 82 | download_file $FTP_URL/hqbird.tar.xz $TMP_DIR "HQbird installer" 83 | 84 | echo Extracting FB installer ================================================== 85 | 86 | mkdir $TMP_DIR/fb $TMP_DIR/conf 87 | tar xvf $TMP_DIR/fb.tar.xz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 88 | tar xvf $TMP_DIR/conf.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 89 | cd $TMP_DIR/fb 90 | 91 | echo Running FB installer ===================================================== 92 | 93 | yes 'masterkey' | ./install.sh 94 | #./install.sh -silent 95 | cd $OLD_DIR 96 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 97 | 98 | echo Installing HQbird ======================================================== 99 | 100 | if [ ! -d /opt/hqbird ]; then 101 | echo "Creating directory /opt/hqbird" 102 | mkdir /opt/hqbird 103 | else 104 | echo "Directory /opt/hqbird already exists" 105 | fi 106 | 107 | tar xvf $TMP_DIR/amvmon.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking AMV archive" 108 | tar xvf $TMP_DIR/distrib.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking DG archive" 109 | tar xvf $TMP_DIR/hqbird.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking HQ archive" 110 | 111 | cp /opt/hqbird/amv/fbccamv.service /opt/hqbird/mon/init/systemd/fbcclauncher.service /opt/hqbird/mon/init/systemd/fbcctracehorse.service /opt/hqbird/init/systemd/hqbird.service /lib/systemd/system 112 | chmod -x /lib/systemd/system/fbcc*.service 113 | systemctl daemon-reload 114 | 115 | if [ ! -d /opt/hqbird/outdataguard ]; then 116 | echo "Creating directory /opt/hqbird/outdataguard" 117 | mkdir /opt/hqbird/outdataguard 118 | else 119 | echo "Directory /opt/hqbird/outdataguard already exists" 120 | fi 121 | echo "Running HQbird setup" 122 | sh /opt/hqbird/hqbird-setup 123 | rm -f /opt/firebird/plugins/libfbtrace2db.so 2 > /dev/null 124 | 125 | echo Registering HQbird ======================================================== 126 | 127 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv 128 | cp -R /opt/hqbird/conf/.defaults/server/* /opt/hqbird/conf/agent/servers/hqbirdsrv 129 | sed -i 's#server.installation =.*#server.installation=/opt/firebird#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 130 | sed -i 's#server.bin.*#server.bin = ${server.installation}/bin#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 131 | sed -i 's#server.id = .*#server.id = hqbirdsrv#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 132 | 133 | java -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xms128m -Xmx192m -XX:+UseG1GC -jar /opt/hqbird/dataguard.jar -config-directory=/opt/hqbird/conf -default-output-directory=/opt/hqbird/outdataguard/ > /dev/null & 134 | sleep 5 135 | java -jar /opt/hqbird/dataguard.jar -register -regemail="linuxauto@ib-aid.com" -regpaswd="L8ND44AD" -installid=/opt/hqbird/conf/installid.bin -unlock=/opt/hqbird/conf/unlock -license="M" 136 | sleep 5 137 | pkill -f dataguard.jar 138 | sleep 3 139 | 140 | echo Registering test database ================================================= 141 | 142 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 143 | cp -R /opt/hqbird/conf/.defaults/database3/* /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 144 | java -jar /opt/hqbird/dataguard.jar -regdb="/opt/firebird/examples/empbuild/employee.fdb" -srvver=3 -config-directory="/opt/hqbird/conf" -default-output-directory="/opt/hqbird/outdataguard" 145 | rm -rf /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 146 | 147 | sed -i 's/db.replication_role=.*/db.replication_role=switchedoff/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/database.properties 148 | sed -i 's/job.enabled.*/job.enabled=false/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/jobs/replmon/job.properties 149 | sed -i 's/^#\s*RemoteAuxPort.*$/RemoteAuxPort = 3059/g' /opt/firebird/firebird.conf 150 | #sed -i 's/ftpsrv.homedir=/ftpsrv.homedir=\/opt\/database/g' /opt/hqbird/conf/ftpsrv.properties 151 | sed -i 's/ftpsrv.passivePorts=40000-40005/ftpsrv.passivePorts=40000-40000/g' /opt/hqbird/conf/ftpsrv.properties 152 | chown -R firebird:firebird /opt/hqbird /opt/firebird/firebird.conf /opt/firebird/databases.conf 153 | 154 | echo Enabling HQbird services ================================================== 155 | # How much physical memory do we have? 156 | m=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') 157 | 158 | if [ "$m" -ge "$ENOUGH_MEM" ]; then 159 | echo "Enabling ALL HQbird services" # Enough memory 160 | svc_list="hqbird fbccamv fbcclauncher fbcctracehorse" 161 | else 162 | echo "Not enough memory to run all HQbird services" # Not enough memory 163 | echo "At least 8GB system memory required" 164 | echo "Enabling only core service" 165 | svc_list="hqbird" 166 | fi 167 | 168 | echo Restarting services ======================================================== 169 | systemctl stop firebird-superserver 170 | systemctl enable $svc_list 171 | systemctl restart $svc_list 172 | sleep 15 173 | systemctl restart firebird-superserver 174 | 175 | exit_script 0 176 | -------------------------------------------------------------------------------- /ubuntu24/fb_hqbird_ub24-40.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=4.0 8 | FTP_URL="https://cc.ib-aid.com/download/distr" 9 | 10 | SYSCTL=/etc/sysctl.conf 11 | SYS_STR="vm.max_map_count" 12 | 13 | TMP_DIR=$(mktemp -d) 14 | OLD_DIR=$(pwd -P) 15 | ENOUGH_MEM=7168000 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y ca-certificates net-tools wget unzip gettext libncurses6 curl tar tzdata locales sudo mc xz-utils file libtommath1 libicu74 openjdk-8-jre 73 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 74 | ln -s libncurses.so.6 /usr/lib/x86_64-linux-gnu/libncurses.so.5 75 | locale-gen "en_US.UTF-8" 76 | 77 | ## Firebird & Hqbird download 78 | download_file $FTP_URL/$FB_VER/fb.tar.xz $TMP_DIR "FB installer" 79 | download_file $FTP_URL/$FB_VER/conf.tar.xz $TMP_DIR "FB config files" 80 | download_file $FTP_URL/amvmon.tar.xz $TMP_DIR "AMV & MON installer" 81 | download_file $FTP_URL/distrib.tar.xz $TMP_DIR "DG installer" 82 | download_file $FTP_URL/hqbird.tar.xz $TMP_DIR "HQbird installer" 83 | 84 | echo Extracting FB installer ================================================== 85 | 86 | mkdir $TMP_DIR/fb $TMP_DIR/conf 87 | tar xvf $TMP_DIR/fb.tar.xz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 88 | tar xvf $TMP_DIR/conf.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 89 | cd $TMP_DIR/fb 90 | 91 | echo Running FB installer ===================================================== 92 | 93 | sed -i 's/libncurses.so.5/libncurses.so.6/g' install.sh 94 | yes 'masterkey' | ./install.sh 95 | #./install.sh -silent 96 | cd $OLD_DIR 97 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 98 | 99 | echo Installing HQbird ======================================================== 100 | 101 | if [ ! -d /opt/hqbird ]; then 102 | echo "Creating directory /opt/hqbird" 103 | mkdir /opt/hqbird 104 | else 105 | echo "Directory /opt/hqbird already exists" 106 | fi 107 | 108 | tar xvf $TMP_DIR/amvmon.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking AMV archive" 109 | tar xvf $TMP_DIR/distrib.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking DG archive" 110 | tar xvf $TMP_DIR/hqbird.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking HQ archive" 111 | 112 | cp /opt/hqbird/amv/fbccamv.service /opt/hqbird/mon/init/systemd/fbcclauncher.service /opt/hqbird/mon/init/systemd/fbcctracehorse.service /opt/hqbird/init/systemd/hqbird.service /lib/systemd/system 113 | chmod -x /lib/systemd/system/fbcc*.service 114 | systemctl daemon-reload 115 | 116 | if [ ! -d /opt/hqbird/outdataguard ]; then 117 | echo "Creating directory /opt/hqbird/outdataguard" 118 | mkdir /opt/hqbird/outdataguard 119 | else 120 | echo "Directory /opt/hqbird/outdataguard already exists" 121 | fi 122 | echo "Running HQbird setup" 123 | sh /opt/hqbird/hqbird-setup 124 | rm -f /opt/firebird/plugins/libfbtrace2db.so 2 > /dev/null 125 | 126 | echo Registering HQbird ======================================================== 127 | 128 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv 129 | cp -R /opt/hqbird/conf/.defaults/server/* /opt/hqbird/conf/agent/servers/hqbirdsrv 130 | sed -i 's#server.installation =.*#server.installation=/opt/firebird#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 131 | sed -i 's#server.bin.*#server.bin = ${server.installation}/bin#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 132 | sed -i 's#server.id = .*#server.id = hqbirdsrv#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 133 | 134 | java -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xms128m -Xmx192m -XX:+UseG1GC -jar /opt/hqbird/dataguard.jar -config-directory=/opt/hqbird/conf -default-output-directory=/opt/hqbird/outdataguard/ > /dev/null & 135 | sleep 5 136 | java -jar /opt/hqbird/dataguard.jar -register -regemail="linuxauto@ib-aid.com" -regpaswd="L8ND44AD" -installid=/opt/hqbird/conf/installid.bin -unlock=/opt/hqbird/conf/unlock -license="M" 137 | sleep 5 138 | pkill -f dataguard.jar 139 | sleep 3 140 | 141 | echo Registering test database ================================================= 142 | 143 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 144 | cp -R /opt/hqbird/conf/.defaults/database4/* /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 145 | java -jar /opt/hqbird/dataguard.jar -regdb="/opt/firebird/examples/empbuild/employee.fdb" -srvver=3 -config-directory="/opt/hqbird/conf" -default-output-directory="/opt/hqbird/outdataguard" 146 | rm -rf /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 147 | 148 | sed -i 's/db.replication_role=.*/db.replication_role=switchedoff/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/database.properties 149 | sed -i 's/job.enabled.*/job.enabled=false/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/jobs/replmon/job.properties 150 | sed -i 's/^#\s*RemoteAuxPort.*$/RemoteAuxPort = 3059/g' /opt/firebird/firebird.conf 151 | #sed -i 's/ftpsrv.homedir=/ftpsrv.homedir=\/opt\/database/g' /opt/hqbird/conf/ftpsrv.properties 152 | sed -i 's/ftpsrv.passivePorts=40000-40005/ftpsrv.passivePorts=40000-40000/g' /opt/hqbird/conf/ftpsrv.properties 153 | chown -R firebird:firebird /opt/hqbird /opt/firebird/firebird.conf /opt/firebird/databases.conf 154 | 155 | echo Enabling HQbird services ================================================== 156 | # How much physical memory do we have? 157 | m=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') 158 | 159 | if [ "$m" -ge "$ENOUGH_MEM" ]; then 160 | echo "Enabling ALL HQbird services" # Enough memory 161 | svc_list="hqbird fbccamv fbcclauncher fbcctracehorse" 162 | else 163 | echo "Not enough memory to run all HQbird services" # Not enough memory 164 | echo "At least 8GB system memory required" 165 | echo "Enabling only core service" 166 | svc_list="hqbird" 167 | fi 168 | 169 | echo Restarting services ======================================================== 170 | systemctl stop firebird 171 | systemctl enable $svc_list 172 | systemctl restart $svc_list 173 | sleep 10 174 | systemctl restart firebird 175 | 176 | exit_script 0 177 | -------------------------------------------------------------------------------- /ubuntu24/fb_hqbird_ub24-50.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FTP_URL="https://cc.ib-aid.com/download/distr" 9 | 10 | SYSCTL=/etc/sysctl.conf 11 | SYS_STR="vm.max_map_count" 12 | 13 | TMP_DIR=$(mktemp -d) 14 | OLD_DIR=$(pwd -P) 15 | ENOUGH_MEM=7168000 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | # curl $url --output $tmp/$fname --progress-bar 25 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 26 | r=$? 27 | s="" 28 | case $m in 29 | "200") s="OK";; 30 | "404") exit_script 1 "File not found on server";; 31 | * ) exit_script 1 "HTTP error ($m)";; 32 | esac 33 | case $r in 34 | 0) echo "OK";; 35 | 23) exit_script $r "Write error";; 36 | 67) exit_script $r "Wrong login / password";; 37 | 78) exit_script $r "File $url does not exist on server";; 38 | *) exit_script $r "Error downloading file ($r)";; 39 | esac 40 | } 41 | 42 | exit_script(){ 43 | p1=$1 44 | p2=$2 45 | if [[ -z "$p1" ]]; then 46 | p1=0 # p1 was empty 47 | fi 48 | # cleanup 49 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 50 | if [ $p1 -eq 0 ]; then # normal termination 51 | if [[ -z "$p2" ]]; then 52 | p2="Script terminated normally" 53 | fi 54 | echo $p2 55 | exit 0 56 | else 57 | if [[ -z "$p2" ]]; then 58 | p2="An error occured during script execution ($p1)" 59 | fi 60 | echo $p2 61 | exit $p1 62 | fi 63 | } 64 | 65 | if grep -q $SYS_STR $SYSCTL; then 66 | echo "Parameter $SYS_STR already set in $SYSCTL" 67 | else 68 | echo "$SYS_STR = 256000" >> $SYSCTL 69 | sysctl -p 70 | fi 71 | 72 | apt update 73 | apt install --no-install-recommends -y ca-certificates net-tools wget unzip gettext libncurses6 curl tar tzdata locales sudo mc xz-utils file libtommath1 libicu74 openjdk-8-jre libatomic1 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | ln -s libncurses.so.6 /usr/lib/x86_64-linux-gnu/libncurses.so.5 76 | locale-gen "en_US.UTF-8" 77 | 78 | ## Firebird & Hqbird download 79 | download_file $FTP_URL/$FB_VER/fb.tar.xz $TMP_DIR "FB installer" 80 | download_file $FTP_URL/$FB_VER/conf.tar.xz $TMP_DIR "FB config files" 81 | download_file $FTP_URL/amvmon.tar.xz $TMP_DIR "AMV & MON installer" 82 | download_file $FTP_URL/distrib.tar.xz $TMP_DIR "DG installer" 83 | download_file $FTP_URL/hqbird.tar.xz $TMP_DIR "HQbird installer" 84 | 85 | echo Extracting FB installer ================================================== 86 | 87 | mkdir $TMP_DIR/fb $TMP_DIR/conf 88 | tar xvf $TMP_DIR/fb.tar.xz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 89 | tar xvf $TMP_DIR/conf.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 90 | cd $TMP_DIR/fb 91 | 92 | echo Running FB installer ===================================================== 93 | 94 | yes 'masterkey' | ./install.sh 95 | #./install.sh -silent 96 | cd $OLD_DIR 97 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 98 | 99 | echo Installing HQbird ======================================================== 100 | 101 | if [ ! -d /opt/hqbird ]; then 102 | echo "Creating directory /opt/hqbird" 103 | mkdir /opt/hqbird 104 | else 105 | echo "Directory /opt/hqbird already exists" 106 | fi 107 | 108 | tar xvf $TMP_DIR/amvmon.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking AMV archive" 109 | tar xvf $TMP_DIR/distrib.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking DG archive" 110 | tar xvf $TMP_DIR/hqbird.tar.xz -C /opt/hqbird > /dev/null || exit_script 1 "Error unpacking HQ archive" 111 | 112 | cp /opt/hqbird/amv/fbccamv.service /opt/hqbird/mon/init/systemd/fbcclauncher.service /opt/hqbird/mon/init/systemd/fbcctracehorse.service /opt/hqbird/init/systemd/hqbird.service /lib/systemd/system 113 | chmod -x /lib/systemd/system/fbcc*.service 114 | systemctl daemon-reload 115 | 116 | if [ ! -d /opt/hqbird/outdataguard ]; then 117 | echo "Creating directory /opt/hqbird/outdataguard" 118 | mkdir /opt/hqbird/outdataguard 119 | else 120 | echo "Directory /opt/hqbird/outdataguard already exists" 121 | fi 122 | echo "Running HQbird setup" 123 | sh /opt/hqbird/hqbird-setup 124 | rm -f /opt/firebird/plugins/libfbtrace2db.so 2 > /dev/null 125 | 126 | echo Registering HQbird ======================================================== 127 | 128 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv 129 | cp -R /opt/hqbird/conf/.defaults/server/* /opt/hqbird/conf/agent/servers/hqbirdsrv 130 | sed -i 's#server.installation =.*#server.installation=/opt/firebird#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 131 | sed -i 's#server.bin.*#server.bin = ${server.installation}/bin#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 132 | sed -i 's#server.id = .*#server.id = hqbirdsrv#g' /opt/hqbird/conf/agent/servers/hqbirdsrv/server.properties 133 | 134 | java -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xms128m -Xmx192m -XX:+UseG1GC -jar /opt/hqbird/dataguard.jar -config-directory=/opt/hqbird/conf -default-output-directory=/opt/hqbird/outdataguard/ > /dev/null & 135 | sleep 5 136 | java -jar /opt/hqbird/dataguard.jar -register -regemail="linuxauto@ib-aid.com" -regpaswd="L8ND44AD" -installid=/opt/hqbird/conf/installid.bin -unlock=/opt/hqbird/conf/unlock -license="M" 137 | sleep 5 138 | pkill -f dataguard.jar 139 | sleep 3 140 | 141 | echo Registering test database ================================================= 142 | 143 | mkdir -p /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 144 | cp -R /opt/hqbird/conf/.defaults/database5/* /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 145 | java -jar /opt/hqbird/dataguard.jar -regdb="/opt/firebird/examples/empbuild/employee.fdb" -srvver=3 -config-directory="/opt/hqbird/conf" -default-output-directory="/opt/hqbird/outdataguard" 146 | rm -rf /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/test_employee_fdb/ 147 | 148 | sed -i 's/db.replication_role=.*/db.replication_role=switchedoff/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/database.properties 149 | sed -i 's/job.enabled.*/job.enabled=false/g' /opt/hqbird/conf/agent/servers/hqbirdsrv/databases/*/jobs/replmon/job.properties 150 | sed -i 's/^#\s*RemoteAuxPort.*$/RemoteAuxPort = 3059/g' /opt/firebird/firebird.conf 151 | #sed -i 's/ftpsrv.homedir=/ftpsrv.homedir=\/opt\/database/g' /opt/hqbird/conf/ftpsrv.properties 152 | sed -i 's/ftpsrv.passivePorts=40000-40005/ftpsrv.passivePorts=40000-40000/g' /opt/hqbird/conf/ftpsrv.properties 153 | chown -R firebird:firebird /opt/hqbird /opt/firebird/firebird.conf /opt/firebird/databases.conf 154 | 155 | echo Enabling HQbird services ================================================== 156 | # How much physical memory do we have? 157 | m=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') 158 | 159 | if [ "$m" -ge "$ENOUGH_MEM" ]; then 160 | echo "Enabling ALL HQbird services" # Enough memory 161 | svc_list="hqbird fbccamv fbcclauncher fbcctracehorse" 162 | else 163 | echo "Not enough memory to run all HQbird services" # Not enough memory 164 | echo "At least 8GB system memory required" 165 | echo "Enabling only core service" 166 | svc_list="hqbird" 167 | fi 168 | 169 | echo Restarting services ======================================================== 170 | systemctl stop firebird 171 | systemctl enable $svc_list 172 | systemctl restart $svc_list 173 | sleep 10 174 | systemctl restart firebird 175 | 176 | exit_script 0 177 | 178 | -------------------------------------------------------------------------------- /ubuntu24/fb_vanilla_ub24-25.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=2.5 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/FirebirdCS-2.5.9.27139-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y ca-certificates net-tools wget unzip gettext libncurses6 curl tar tzdata locales sudo xz-utils file libtommath1 libicu74 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | ln -s libncurses.so.6 /usr/lib/x86_64-linux-gnu/libncurses.so.5 76 | locale-gen "en_US.UTF-8" 77 | 78 | download_file $FB_URL $TMP_DIR "FB installer" 79 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 80 | 81 | echo Extracting FB installer ================================================== 82 | 83 | mkdir $TMP_DIR/fb $TMP_DIR/conf 84 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 85 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 86 | cd $TMP_DIR/fb 87 | 88 | echo Running FB installer ===================================================== 89 | 90 | yes 'masterkey' | ./install.sh 91 | cd $OLD_DIR 92 | echo -ne 'thread' | /opt/firebird/bin/changeMultiConnectMode.sh 93 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 94 | 95 | service firebird stop 96 | sleep 5 97 | service firebird start 98 | 99 | exit_script 0 100 | 101 | -------------------------------------------------------------------------------- /ubuntu24/fb_vanilla_ub24-30.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=3.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v3.0.12/Firebird-3.0.12.33787-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y ca-certificates net-tools wget unzip gettext libncurses6 curl tar tzdata locales sudo xz-utils file libtommath1 libicu74 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | ln -s libncurses.so.6 /usr/lib/x86_64-linux-gnu/libncurses.so.5 76 | locale-gen "en_US.UTF-8" 77 | 78 | download_file $FB_URL $TMP_DIR "FB installer" 79 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 80 | 81 | echo Extracting FB installer ================================================== 82 | 83 | mkdir $TMP_DIR/fb $TMP_DIR/conf 84 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 85 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 86 | cd $TMP_DIR/fb 87 | 88 | echo Running FB installer ===================================================== 89 | 90 | yes 'masterkey' | ./install.sh 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | exit_script 0 95 | 96 | -------------------------------------------------------------------------------- /ubuntu24/fb_vanilla_ub24-40.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=4.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v4.0.5/Firebird-4.0.5.3140-0.amd64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y ca-certificates net-tools wget unzip gettext libncurses6 curl tar tzdata locales sudo xz-utils file libtommath1 libicu74 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | ln -s libncurses.so.6 /usr/lib/x86_64-linux-gnu/libncurses.so.5 76 | locale-gen "en_US.UTF-8" 77 | 78 | download_file $FB_URL $TMP_DIR "FB installer" 79 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 80 | 81 | echo Extracting FB installer ================================================== 82 | 83 | mkdir $TMP_DIR/fb $TMP_DIR/conf 84 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 85 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 86 | cd $TMP_DIR/fb 87 | 88 | echo Running FB installer ===================================================== 89 | 90 | yes 'masterkey' | ./install.sh 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | exit_script 0 95 | 96 | -------------------------------------------------------------------------------- /ubuntu24/fb_vanilla_ub24-50.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Please contact IBSurgeon with any question regarding this script: support@ib-aid.com 4 | # This script is provided AS IS, without any warranty. 5 | # This script is licensed under IDPL https://firebirdsql.org/en/initial-developer-s-public-license-version-1-0/ 6 | 7 | FB_VER=5.0 8 | FB_URL="https://github.com/FirebirdSQL/firebird/releases/download/v5.0.1/Firebird-5.0.1.1469-0-linux-x64.tar.gz" 9 | FTP_URL="https://cc.ib-aid.com/download/distr" 10 | 11 | SYSCTL=/etc/sysctl.conf 12 | SYS_STR="vm.max_map_count" 13 | 14 | TMP_DIR=$(mktemp -d) 15 | OLD_DIR=$(pwd -P) 16 | 17 | download_file(){ 18 | url=$1 19 | tmp=$2 20 | name=$3 21 | fname=$(basename -- "$url") 22 | 23 | echo "Downloading $name..." 24 | m=$(curl -w "%{http_code}" --location $url --output $tmp/$fname --progress-bar) 25 | r=$? 26 | s="" 27 | case $m in 28 | "200") s="OK";; 29 | "404") exit_script 1 "File not found on server";; 30 | * ) exit_script 1 "HTTP error ($m)";; 31 | esac 32 | case $r in 33 | 0) echo "OK";; 34 | 23) exit_script $r "Write error";; 35 | 67) exit_script $r "Wrong login / password";; 36 | 78) exit_script $r "File $url does not exist on server";; 37 | *) exit_script $r "Error downloading file ($r)";; 38 | esac 39 | } 40 | 41 | exit_script(){ 42 | p1=$1 43 | p2=$2 44 | if [[ -z "$p1" ]]; then 45 | p1=0 # p1 was empty 46 | fi 47 | # cleanup 48 | if [ -d $TMP_DIR ]; then rm -rf $TMP_DIR; fi 49 | if [ $p1 -eq 0 ]; then # normal termination 50 | if [[ -z "$p2" ]]; then 51 | p2="Script terminated normally" 52 | fi 53 | echo $p2 54 | exit 0 55 | else 56 | if [[ -z "$p2" ]]; then 57 | p2="An error occured during script execution ($p1)" 58 | fi 59 | echo $p2 60 | exit $p1 61 | fi 62 | } 63 | 64 | if grep -q $SYS_STR $SYSCTL; then 65 | echo "Parameter $SYS_STR already set in $SYSCTL" 66 | else 67 | echo "$SYS_STR = 256000" >> $SYSCTL 68 | sysctl -p 69 | fi 70 | 71 | apt update 72 | apt install --no-install-recommends -y ca-certificates net-tools wget unzip gettext libncurses6 curl tar tzdata locales sudo xz-utils file libtommath1 libicu74 libatomic1 73 | 74 | ln -s libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 75 | ln -s libncurses.so.6 /usr/lib/x86_64-linux-gnu/libncurses.so.5 76 | locale-gen "en_US.UTF-8" 77 | 78 | download_file $FB_URL $TMP_DIR "FB installer" 79 | download_file $FTP_URL/$FB_VER/confv.tar.xz $TMP_DIR "FB config files" 80 | 81 | echo Extracting FB installer ================================================== 82 | 83 | mkdir $TMP_DIR/fb $TMP_DIR/conf 84 | tar xvf $TMP_DIR/*.gz -C $TMP_DIR/fb --strip-components=1 > /dev/null || exit_script 1 "Error unpacking FB archive" 85 | tar xvf $TMP_DIR/confv.tar.xz -C $TMP_DIR/conf > /dev/null || exit_script 1 "Error unpacking conf archive" 86 | cd $TMP_DIR/fb 87 | 88 | echo Running FB installer ===================================================== 89 | 90 | yes 'masterkey' | ./install.sh 91 | cd $OLD_DIR 92 | cp -rf $TMP_DIR/conf/*.conf /opt/firebird 93 | 94 | exit_script 0 95 | 96 | --------------------------------------------------------------------------------