Today the company to use SQL Server, I do not know what the eldest brother smoked crazy, no way, their environment to install expansion AH.
Join Microsoft's Source
Curl HTTPS://packages.microsoft.com/config/rhel/7/prod.repo >/etc/yum.repos.d/mssqlrelease.repo
Install the driver (three must be installed, indispensable)
Yum Install msodbcsql MSSQL-Tools UnixODBC-devel
Download Pdo_sqlsrv expansion pack Http://pecl.php.net/package/pdo_sqlsrv
Note: The extension package is on pecl, and the simple explanation is the PHP expansion pack. As for PECL is specific what does not know the degree Niang bar.
wget download
Extract
- Command: Tar -zxvf pdo_sqlsrv-4.3.0.tgz
- Command: CD pdo_sqlserv-4.3.0
- Description: (more nonsense) looking for your phpize my is using the pagoda panel, each person's phpize may not be the same, specific according to Phpize, installed is the php7.1 environment, find my phpize extension command in/www/server/php/71/ Bin/phpize
- Command:/www/server/php/71/bin/phpize
- Command:. /configure--with-php-config=/www/server/php/71/bin/phpize
- Make && make install
- Modify php.ini find: Extension = again last extension= added on extension = "pdo_sqlsrv.so" General after make && do install will show your extension build Position
- My Build Extension location
Restart PHP
Command: php-m | grep pdo_sqlsrv
Done
This method is common to other extensions as long as the download of different extension packages is compiled in pecl.
Centos7 Compiling PHP Extensions-detailed version