Last active
November 5, 2023 11:46
-
-
Save tva77/4626d6b5e43f020cccdd0a860e4b7cd3 to your computer and use it in GitHub Desktop.
how to install MS SQL SERVER driver in a ubuntu 22 with plesk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UBUNTU 22 | |
sudo apt-get install apt-transport-https make gcc g++ unixodbc unixodbc-dev plesk-php82-dev | |
sudo curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc | |
sudo curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list | |
sudo apt-get update | |
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 | |
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools18 | |
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc | |
source ~/.bashrc | |
sudo /opt/plesk/php/8.2/bin/pecl install pdo_sqlsrv | |
login as root at plesk terminal web | |
echo "extension=pdo_sqlsrv.so" > /opt/plesk/php/8.2/etc/php.d/pdo_sqlsrv.ini | |
/opt/plesk/php/8.2/bin/pecl install sqlsrv | |
echo "extension=sqlsrv.so" > /opt/plesk/php/8.2/etc/php.d/sqlsrv.ini | |
plesk bin php_handler --reread | |
plesk sbin packagemng -sdf | |
/opt/plesk/php/8.2/bin/php -m | grep sqlsrv | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment