Skip to content

Instantly share code, notes, and snippets.

@humbletiger
Forked from proxium/aws-ec2-php7.2-script.sh
Created August 11, 2019 04:46
Show Gist options
  • Save humbletiger/fb66b82ec12aa41794df9f7c0b20696c to your computer and use it in GitHub Desktop.
Save humbletiger/fb66b82ec12aa41794df9f7c0b20696c to your computer and use it in GitHub Desktop.
Install PHP 7 on AWS EC2 Linux Instance
# Pick the topic name or number from the list below
#sudo amazon-linux-extras list
# 0 ansible2 disabled [ =2.4.2 ]
# 1 emacs disabled [ =25.3 ]
# 2 memcached1.5 disabled [ =1.5.1 ]
# 3 nginx1.12 disabled [ =1.12.2 ]
# 4 postgresql9.6 disabled [ =9.6.6 ]
# 5 python3 disabled [ =3.6.2 ]
# 6 redis4.0 disabled [ =4.0.5 ]
# 7 R3.4 disabled [ =3.4.3 ]
# 8 rust1 disabled [ =1.22.1 ]
# 9 vim disabled [ =8.0 ]
# 10 golang1.9 disabled [ =1.9.2 ]
# 11 ruby2.4 disabled [ =2.4.2 ]
# 12 nano disabled [ =2.9.1 ]
# 13 php7.2=latest enabled [ =7.2.0 ]
# 14 lamp-mariadb10.2-php7.2 disabled [ =10.2.10_7.2.0 ]
sudo amazon-linux-extras enable php7.2
sudo yum update
# check available php packages
yum list available 'php*'
# install desired packages (at your convenience)
sudo yum install php-json php-xml php-cli php-mbstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment