Last active
May 19, 2022 13:37
-
-
Save yusufusta/d36983c6b216e1db3667615149ad9b92 to your computer and use it in GitHub Desktop.
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
# ubuntu 22.04 | |
function downloadLatestPhp(){ | |
result=$(wget -qO- 'https://www.php.net/releases/index.php?json&max=1') | |
version_name=$(echo $result | jq -r .[keys[-1]].version) | |
url=$(echo $result | jq -r .[keys[-1]].source[0].filename) | |
wget "https://www.php.net/distributions/$url"; | |
tar -xvf $url | |
cd "php-$version_name" | |
} | |
sudo su | |
apt update -y | |
apt install -y wget jq build-essential autoconf libtool bison re2c pkg-config tar | |
downloadLatestPhp | |
./buildconf | |
./configure --enable-embed=static --with-layout=GNU --disable-all | |
make -j8 | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment