1. Install FreeTDS
cd /tmp
wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
tar zxvf freetds-stable.tgz
cd freetds-0.91
./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix
make && make install
2. Install php mssql extension
Here php56 is used to demonstrate
cd /tmp
wget http://cn2.php.net/distributions/php-5.6.30.tar.gz
tar -zxvf php-5.6.30.tar.gz
cd php-5.6.30/ext/mssql/
/www/server/php/56/bin/phpize
./configure --with-php-config=/www/server/php/56/bin/php-config --with-mssql=/usr/local/freetds/
make && make install
3. Modify the php configuration file to add mssql.so
4.Restart the php service and check phpinfo