HOW TO INSTALL SQL_SRV PADA UBUNTU 18.04/20.04

 


1. sudo apt update


2. sudo apt install php-pear php-dev


3. curl -s https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -


4. sudo bash -c "curl -s https://packages.microsoft.com/config/ubuntu/20.04/prod.list > /etc/apt/sources.list.d/mssql-release.list"


5. sudo apt update


6. sudo ACCEPT_EULA=Y apt -y install msodbcsql17 mssql-tools


7. sudo apt -y install unixodbc-dev


8. sudo apt -y install gcc g++ make autoconf libc-dev pkg-config


9. sudo pecl install sqlsrv


10. sudo pecl install pdo_sqlsrv


11. sudo bash -c "echo extension=sqlsrv.so > /etc/php/7.4/apache2/conf.d/sqlsrv.ini"


12. sudo ln -s /etc/php/7.4/apache2/sqlsrv.ini /etc/php/7.4/cli/conf.d/sqlsrv.ini


13. sudo bash -c "echo extension=pdo_sqlsrv.so > /etc/php/7.4/apache2/conf.d/pdo_sqlsrv.ini"


14. sudo ln -s /etc/php/7.4/apache2/pdo_sqlsrv.ini /etc/php/7.4/cli/conf.d/pdo_sqlsrv.ini


15. sudo phpenmod -v 7.4 sqlsrv pdo_sqlsrv

16. sudo service apache2 restart

Ori Grata

Abstrak

Please Select Embedded Mode For Blogger Comments

أحدث أقدم

Ikuti lewat Email

Advertisement