centos7 php连sqlserver不是很常见,但是也会有这样的需求
1,安装remi源
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm # rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
2,安装microsoft源
# curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo
3,安装msodbcsql17,mssql-tools,unixODBC-devel
# ACCEPT_EULA=Y yum install -y msodbcsql17 # ACCEPT_EULA=Y yum install -y mssql-tools # yum install -y unixODBC-devel
4,安装sqlsrv
# yum search sqlsrv # yum install php71w-pdo_dblib php71-php-sqlsrv # systemctl restart php-fpm # php -m | grep dblib pdo_dblib
转载请注明
作者:海底苍鹰
地址:http://blog.51yip.com/php/2168.html