Skip to content

Instantly share code, notes, and snippets.

@elmijo
Last active March 9, 2020 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save elmijo/db12893f51d5f75018a7acd418b6a6ab to your computer and use it in GitHub Desktop.
Save elmijo/db12893f51d5f75018a7acd418b6a6ab to your computer and use it in GitHub Desktop.
This script allows us to install version 5.6 of php + composer
#! /bin/bash
sudo apt-get install software-properties-common curl git apache2 mcrypt -y
sudo a2enmod headers rewrite
sudo service apache2 restart
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update
sudo apt-get install php5.6 php5.6-curl php5.6-gd php5.6-imagick php5.6-intl php5.6-mcrypt php5.6-mysql php5.6-odbc php5.6-pgsql php5.6-xsl php5.6-xmlrpc php5.6-soap php-pear php5.6-cli php5.6-xml php5.6-xdebug
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
@elmijo
Copy link
Author

elmijo commented Mar 2, 2017

This is the simple way to use

curl -sSo- https://gist.githubusercontent.com/ElMijo/db12893f51d5f75018a7acd418b6a6ab/raw/06d7e397226738845ae8341a4604abc89943187a/ubuntu-install-php5.6.sh | sudo sh

More info: ondrej/php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment