Created
July 8, 2016 11:12
-
-
Save martinsotirov/05f4d57f4aeaa4134d04b3f5199cd8f5 to your computer and use it in GitHub Desktop.
Builds and installs the ssh2 extension for php 7
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 characters
#!/bin/bash | |
echo "Installing prerequisites" | |
apt-get install libssh2-1 libssh2-1-dev -y &>/dev/null | |
echo "Downloading pecl-networking-ssh2" | |
wget https://github.com/php/pecl-networking-ssh2/archive/master.zip &>/dev/null | |
echo "Installing pecl-networking-ssh2" | |
unzip master.zip &>/dev/null | |
cd pecl-networking-ssh2-master &>/dev/null | |
phpize &>/dev/null | |
./configure &>/dev/null | |
make &>/dev/null | |
make install &>/dev/null | |
cd .. | |
rm -r master.zip pecl-networking-ssh2-master | |
echo "Adding ssh2 module config file" | |
cat > /etc/php/7.0/fpm/conf.d/20-ssh2.ini << EOF | |
; configuration for php ssh2 module | |
; priority=20 | |
extension=ssh2.so | |
EOF | |
echo "Restarting PHP 7 fpm" | |
service php7.0-fpm restart &>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment