Last active
March 7, 2020 14:58
-
-
Save alexandreelise/61d6ee71935131579f19489a9679a8ff to your computer and use it in GitHub Desktop.
Install php7.4 on Debian based machines. But first need to add ondrej/php ppa or source list file.
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
#!/usr/env sh | |
# To add this repository please do: | |
if [ "$(whoami)" != "root" ]; then | |
SUDO=sudo | |
fi | |
${SUDO} apt-get -y install apt-transport-https lsb-release ca-certificates curl \ | |
&& ${SUDO} wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \ | |
&& ${SUDO} sh -c "echo \"deb https://packages.sury.org/php/$(lsb_release -si | awk '{print tolower($0)}' ) $(lsb_release -sc) main\" > /etc/apt/sources.list.d/php.list" \ | |
&& ${SUDO} apt-get update -y \ | |
|| echo "Installing php7.4.x" \ | |
&& ${SUDO} apt-get install -y \ | |
php7.4-common php7.4-fpm php7.4-cli php7.4-dev php-ssh2 php7.4-zip php7.4-xml php7.4-json \ | |
php-igbinary php7.4-ldap php-uuid php7.4-mbstring php7.4-intl php7.4-soap \ | |
php7.4-curl php7.4-gd php7.4-xsl php7.4-bcmath php7.4-mysql \ | |
php7.4-opcache php7.4-sqlite3 php-redis php-geoip php-ast php-xdebug \ | |
&& echo "php7.4.x installed successfully" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment