adepratama
You can try the following tutorial,
Here take php73 as an example
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo
yum clean all
yum update -y
ACCEPT_EULA=Y yum install -y msodbcsql mssql-tools unixODBC-devel
cd /tmp
wget https://pecl.php.net/get/sqlsrv-4.3.0.tgz
tar -zxvf sqlsrv-4.3.0.tgz
cd sqlsrv-4.3.0
/www/server/php/73/bin/phpize
./configure
make
make install
echo "extension=sqlsrv.so" >> /www/server/php/73/etc/php.ini
cd /tmp
wget https://pecl.php.net/get/pdo_sqlsrv-4.3.0.tgz
tar -zxvf pdo_sqlsrv-4.3.0.tgz
cd pdo_sqlsrv-4.3.0
/www/server/php/73/bin/phpize
./configure
make
make install
echo ""
echo "extension=pdo_sqlsrv.so" >> /www/server/php/73/etc/php.ini