Skip to content

Instantly share code, notes, and snippets.

@dkhorev
Last active August 23, 2022 20:27
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dkhorev/807f808b7baab1daba8ba08eaa77d824 to your computer and use it in GitHub Desktop.
Save dkhorev/807f808b7baab1daba8ba08eaa77d824 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
sudo apt update
sudo apt -y install curl
# Set up PHP 8.0
sudo apt update
sudo apt -y install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt -y install --no-install-recommends php8.0 composer php8.0-xml \
php8.0-intl php8.0-curl php8.0-zip php8.0-sqlite3 php8.0-mysql \
php8.0-xdebug php8.0-mbstring php8.0-redis
# Set up PHP 8.1
sudo apt update
sudo apt -y install --no-install-recommends php8.1 composer php8.1-xml \
php8.1-intl php8.1-curl php8.1-zip php8.1-sqlite3 php8.1-mysql \
php8.1-xdebug php8.1-mbstring php8.1-redis
# How to switch php versions
sudo update-alternatives --config php
# How to disable/enable xdebug
sudo phpdismod xdebug
sudo phpenmod xdebug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment