标签:packages source and 成功 sql 安装 mss comm 文章
PHP 7.2.9-1+ubuntu18.04.1 安装 sqlsrv 扩展
参考文章 https://serverpilot.io/docs/how-to-install-the-php-sqlsrv-extension
curl -s https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - sudo bash -c "curl -s https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list" sudo apt-get update
(这里是时间过期了) date -s 12/12/2018 && date -s 20:19:00 && sudo hwclock --systohc 改成当前时间即可
sudo ACCEPT_EULA=Y apt-get -y install msodbcsql17 mssql-tools sudo apt-get -y install unixodbc-dev sudo apt-get -y install gcc g++ make autoconf libc-dev pkg-config sudo pecl install sqlsrv sudo pecl install pdo_sqlsrv (pecl command not found ) (如果pecl执行不成功先执行以下2条命令) (sudo apt-get install php-pear php-dev) sudo bash -c "echo extension=sqlsrv.so > /etc/php/conf.d/sqlsrv.ini" sudo bash -c "echo extension=pdo_sqlsrv.so > /etc/php/conf.d/pdo_sqlsrv.ini" sudo service php-fpm restart (/etc/php/conf.d 代表的是你本机的php安装路径)
php7.2 sqlsrv 扩展 ubuntu Homestead
标签:packages source and 成功 sql 安装 mss comm 文章
原文地址:https://www.cnblogs.com/zhaoyang-1989/p/10121429.html