Hi There,
It seems to me that there is not a definitive guide to install MS SQL (Microsoft’s PHP MS SQL drivers) on Ubuntu, so here is the 20 steps:
Install Ubuntu (tested on 16.04 LTS)
sudo -s
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
apt-get update
ACCEPT_EULA=Y apt-get install msodbcsql17
apt-get install unixodbc-de
vadd-apt-repository ppa:ondrej/php
apt-get update
apt-get install php7.2 php-dev php-xml php-pearĀ
echo extension=pdo_sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/30-pdo_sqlsrv.ini
echo extension=sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20-sqlsrv.ini
pecl install sqlsrv
pecl install pdo_sqlsrv
a2dismod mpm_event
a2enmod mpm_prefork
a2enmod php7.2
echo "extension=sqlsrv.so" >> /etc/php/7.2/apache2/php.ini
echo "extension=pdo_sqlsrv.so" >> /etc/php/7.2/apache2/php.ini
service apache2 restart