Created
January 26, 2021 15:40
-
-
Save mrbenosborne/02672702eabdf7343036360d6a845862 to your computer and use it in GitHub Desktop.
Download PHP and Build from Source
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
#!/bin/bash | |
PHP_VERSION=$1 | |
WORKDIR=$(pwd) | |
DOWNLOAD_FILE="php-$PHP_VERSION.tar.gz" | |
TAR_OUT_DIR="$WORKDIR/php-src-php-$PHP_VERSION" | |
curl -O -L https://github.com/php/php-src/archive/$DOWNLOAD_FILE | |
tar -zxvf "$WORKDIR/$DOWNLOAD_FILE" | |
cd $TAR_OUT_DIR | |
./buildconf --force | |
./configure --prefix=/usr/local/php$PHP_VERSION --enable-fpm --disable-short-tags --with-openssl --with-zlib --enable-bcmath --enable-calendar --with-curl --enable-exif --with-gd --enable-intl --enable-mbstring --with-mysqli --enable-pcntl --with-pdo-mysql --enable-soap --enable-sockets --with-xmlrpc --with-password-argon2 | |
make | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment