@
745839 刚刚放假回来
<!--markdown-->[github>安装步骤][1]
[微软官方][2]
[unixODBC][3]
[PDF][4]
```
> step1
sudo su
curl
https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo
[exit]
sudo yum update
sudo yum remove unixODBC-utf16-devel #to avoid conflicts
sudo ACCEPT_EULA=Y yum install msodbcsql mssql-tools
sudo yum install unixODBC-devel
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
> step2
sudo pecl install sqlsrv-devel
sudo pecl install pdo_sqlsrv-devel
```
[1]:
https://github.com/Microsoft/msphpsql/tree/master#install-unix [2]:
https://docs.microsoft.com/en-us/sql/connect/php/system-requirements-for-the-php-sql-driver [3]:
http://www.unixodbc.org/ [4]:
https://download.microsoft.com/download/C/E/2/CE29C106-4C2D-4FBB-BB29-F34F91A8E478/Unix_4.3_Install_Instructions.pdf