Skip to content

Instantly share code, notes, and snippets.

@OrlandoST
Last active April 6, 2019 21:34
Show Gist options
  • Save OrlandoST/83885bf5bc40603a2a4c38b4fc493eb8 to your computer and use it in GitHub Desktop.
Save OrlandoST/83885bf5bc40603a2a4c38b4fc493eb8 to your computer and use it in GitHub Desktop.
Cloud9 PHP7.2
#!/bin/bash
## Upgrade to php7.2 and install required dependencies
# execute this script using
# source <(curl RAW_GIST_URL)
read -p "You are about to upgrade to PHP 7.2 OK? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo 'y' | sudo add-apt-repository ppa:ondrej/php && \
sudo apt-get update && \
sudo apt-get -y install libapache2-mod-php7.2 && \
sudo a2dismod php5 && \
sudo a2enmod php7.2 && \
sudo apt-get -y install php7.2-dom php7.2-mbstring php7.2-zip php7.2-mysql php7.2-sqlite php7.2-intl php7.2-mbstring && \
sudo service apache2 restart
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment