Last active
August 23, 2022 20:27
-
-
Save dkhorev/807f808b7baab1daba8ba08eaa77d824 to your computer and use it in GitHub Desktop.
This file contains 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/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