Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SQL Server Driver Installer for Laravel Homestead
#!/bin/bash
# SQL Server Driver Installer for Laravel Homestead
#
# This script downloads, compiles, and installs the PHP 7 extension
# files for both the native sqlsrv and the PDO pdo_sqlsrv drivers.
# Get the Microsoft Driver Source Code from Github
cd ~
git clone https://github.com/Microsoft/msphpsql.git
cd msphpsql
git checkout PHP-7.0-Linux
# Run the ODBC Installer Script
sh ODBC\ install\ scripts/installodbc_ubuntu.sh
# Compile and Install the Native sqlsrv Driver
cd ~/msphpsql/source/sqlsrv
phpize && ./configure CXXFLAGS=-std=c++11 && make
sudo make install
sudo echo "extension=sqlsrv.so" | sudo tee /etc/php/7.0/mods-available/sqlsrv.ini
phpenmod sqlsrv
# Compile and Install the pdo_sqlsrv Driver
cd ~/msphpsql/source/pdo_sqlsrv
phpize && ./configure CXXFLAGS=-std=c++11 && make
sudo make install
sudo echo "extension=pdo_sqlsrv.so" | sudo tee /etc/php/7.0/mods-available/pdo_sqlsrv.ini
sudo phpenmod pdo_sqlsrv
# Restart the PHP-FPM Service
sudo systemctl restart php7.0-fpm.service
# Clean Up
echo "Done."
@flycj

This comment has been minimized.

Copy link

@flycj flycj commented Sep 17, 2018

laravel vagrant install

Err:8 https://dist.crystal-lang.org/apt crystal InRelease
Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 13.33.231.62 443]
Err:9 https://cli-assets.heroku.com/apt ./ InRelease
Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 13.35.121.88 443]
Err:10 https://deb.nodesource.com/node_8.x bionic InRelease
Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 54.239.216.23 443]
Reading package lists... Done
W: Failed to fetch https://dist.crystal-lang.org/apt/dists/crystal/InRelease Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 13.33.231.62 443]
W: Failed to fetch https://cli-assets.heroku.com/apt/./InRelease Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 13.35.121.88 443]
W: Failed to fetch https://deb.nodesource.com/node_8.x/dists/bionic/InRelease Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 54.239.216.23 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.

help me thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment