PHP 8.1.33
Preview: install_odbc Size: 526 B
//opt/alt/alt-php-config/install_odbc

#!/bin/sh

#dist_ver=$(cat /etc/redhat-release | sed -e 's#[^0-9]*##g' | cut -b1)

# add repo conf
#curl https://packages.microsoft.com/config/rhel/${dist_ver}/prod.repo > /etc/yum.repos.d/mssql-release.repo
cat << EOF > /etc/yum.repos.d/mssql-release.repo
[packages-microsoft-com-prod]
name=packages-microsoft-com-prod
baseurl=https://packages.microsoft.com/rhel/\$releasever/prod/
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
EOF

# install packages
ACCEPT_EULA=Y yum -y install msodbcsql17

Directory Contents

Dirs: 1 × Files: 5

Name Size Perms Modified Actions
- drwxr-xr-x 2025-10-10 08:34:21
Edit Download
8.55 KB lrwxr-xr-x 2025-10-22 09:00:54
Edit Download
292 B lrw-r--r-- 2024-12-11 08:15:29
Edit Download
699 B lrwxr-xr-x 2025-10-22 09:00:54
Edit Download
526 B lrwxr-xr-x 2025-10-22 08:40:36
Edit Download
7.71 KB lrwxr-xr-x 2025-10-22 09:00:55
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).