Last active
March 17, 2024 16:40
-
-
Save DreadfulCode/dd043b595cffff02cccb8815c25716c9 to your computer and use it in GitHub Desktop.
Ubuntu 20.04.2 LTS: Install PHP 8.2 with curl, mbstring, intl, xml, psqsl extensions and Composer
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
#install PHP with extensions for redis and postgres | |
sudo dpkg -l | grep php | tee packages.txt && | |
sudo add-apt-repository ppa:ondrej/php && | |
sudo apt update && | |
sudo apt install -y php8.2 php8.2-cli php8.2-fpm php-bz2 php-curl php-mbstring php-intl php8.2-xml php-pgsql redis-tools && | |
sudo service apache2 restart && | |
sudo service apache2 status | |
#Install Composer | |
cd ~ && | |
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php && | |
HASH=`curl -sS https://composer.github.io/installer.sig` && | |
echo $HASH && | |
php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && | |
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer && | |
composer -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment