xXxlazharxXx
Here take php73 as an example
Install the driver
yum install msodbcsql mssql-tools unixODBC-devel
Download pdo_sqlsrv extension package
wget http://pecl.php.net/get/pdo_sqlsrv-5.3.0.tgz
Unzip
tar -zxvf pdo_sqlsrv-5.3.0.tgz
Enter the decompression directory
cd pdo_sqlsrv-5.3.0
Excuting an order
/www/server/php/73/bin/phpize
./configure --with-php-config=/www/server/php/73/bin/php-config
Compile and install
make && make install
Update php.ini
Modify /www/server/php/73/etc/php.ini to find: extension =
then the last extension add extension = "pdo_sqlsrv.so"