Last active
May 25, 2023 00:14
-
-
Save joecampo/6f777a659b8132b9d6fe1c3589df394c to your computer and use it in GitHub Desktop.
Revisions
-
joecampo revised this gist
Dec 7, 2016 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -50,12 +50,12 @@ sudo ln -s /etc/php/7.0/mods-available/pdo_sqlsrv.ini /etc/php/7.0/cli/conf.d/20 cd ~ echo "Cleaning up.." sudo rm -rf msphpsql-4.0.6-Linux/ sudo rm -rf unixODBC-2.3.1/ sudo rm -rf msodbcsql-13.0.0.0/ sudo rm 4.0.6-Linux.tar.gz sudo rm msodbcsql-13.0.0.0.tar.gz sudo rm unixODBC-2.3.1.tar.gz echo "All done, please be sure to test via the CLI & restart php7.0-fpm once complete." php -i | grep 'PDO drivers' -
joecampo revised this gist
Dec 7, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,7 @@ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /u cd ~ echo "Configuring the unixODBC 2.3.1 Driver Manager" wget ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.1.tar.gz tar -xzf unixODBC-2.3.1.tar.gz cd unixODBC-2.3.1/ ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE 1> odbc_con.log 2> make_err.log -
joecampo created this gist
Nov 16, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,60 @@ #!/bin/bash sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo -i export CPPFLAGS="-DSIZEOF_LONG_INT=8" sudo apt-get -y install gcc-5 g++-5 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5 cd ~ echo "Configuring the unixODBC 2.3.1 Driver Manager" wget ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.1.tar.gz cd unixODBC-2.3.1/ ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE 1> odbc_con.log 2> make_err.log echo "Building and Installing the unixODBC 2.3.1 Driver Manager" sudo make 1> make_std.log 2> make_err.log sudo make install 1> makeinstall_std.log 2> makeinstall_err.log cd ~ echo "Downloading the Microsoft ODBC Driver 13 for SQL Server - Ubuntu" wget "https://meetsstorenew.blob.core.windows.net/contianerhd/Ubuntu%2013.0%20Tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18T17%3A29%3A00Z&se=2022-10-19T17%3A29%3A00Z&sp=rl&sv=2015-04-05&sr=b&sig=cDwPfrouVeIQf0vi%2BnKt%2BzX8Z8caIYvRCmicDL5oknY%3D" -O msodbcsql-13.0.0.0.tar.gz tar -xzf msodbcsql-13.0.0.0.tar.gz cd msodbcsql-13.0.0.0/ echo "Installing Dependencies" sudo apt-get -y install libssl1.0.0 sudo apt-get -y install libgss3 sudo echo "/usr/lib64" >> /etc/ld.so.conf sudo ldconfig echo "Installing the Microsoft ODBC Driver 13 for SQL Server - Ubuntu" sudo bash ./install.sh install --force --accept-license cd ~ echo "Compiling PHP driver" sudo apt-get -y install php7.0-dev wget https://github.com/Microsoft/msphpsql/archive/4.0.6-Linux.tar.gz tar -xzf 4.0.6-Linux.tar.gz cd msphpsql-4.0.6-Linux/source/pdo_sqlsrv/ phpize && ./configure CXXFLAGS=-std=c++11 && make sudo make install echo "Enabling Driver for php7.0-fpm and CLI" sudo bash -c 'echo -e "; configuration for php common module \n; priority=10 \nextension=pdo_sqlsrv.so" > /etc/php/7.0/mods-available/pdo_sqlsrv.ini' sudo ln -s /etc/php/7.0/mods-available/pdo_sqlsrv.ini /etc/php/7.0/fpm/conf.d/20-pdo_sqlsrv.ini sudo ln -s /etc/php/7.0/mods-available/pdo_sqlsrv.ini /etc/php/7.0/cli/conf.d/20-pdo_sqlsrv.ini cd ~ echo "Cleaning up.." rm -rf msphpsql-4.0.6-Linux/ rm -rf unixODBC-2.3.1/ rm -rf msodbcsql-13.0.0.0/ rm 4.0.6-Linux.tar.gz rm msodbcsql-13.0.0.0.tar.gz rm unixODBC-2.3.1.tar.gz echo "All done, please be sure to test via the CLI & restart php7.0-fpm once complete." php -i | grep 'PDO drivers'