Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DreadfulCode/dd043b595cffff02cccb8815c25716c9 to your computer and use it in GitHub Desktop.
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
#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