Skip to content

Instantly share code, notes, and snippets.

@mikepfeiffer
Created April 10, 2018 21:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save mikepfeiffer/00a746ef274b62bf506e8f8602e03333 to your computer and use it in GitHub Desktop.
Save mikepfeiffer/00a746ef274b62bf506e8f8602e03333 to your computer and use it in GitHub Desktop.
#!/bin/bash
yum update -y
yum install -y httpd24 php56 mysql php56-mysqlnd
service httpd start
chkconfig httpd on
echo "fs-56fc251e.efs.us-east-1.amazonaws.com:/ /var/www/html nfs4 nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 0 0" >> /etc/fstab
mount -a
@be-aws-architect
Copy link

be-aws-architect commented Dec 15, 2019

#!/bin/bash

yum update -y
yum -y install httpd mysql
amazon-linux-extras install epel -y
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager --disable remi-php54
yum-config-manager --enable remi-php73
amazon-linux-extras install php7.3 -y
service httpd start
chkconfig httpd on
echo "fs-ffd1b734.efs.eu-west-1.amazonaws.com:/ /var/www/html nfs4 nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 0 0" >> /etc/fstab
mount -a
systemctl restart httpd

@nicholaschaung
Copy link

Another alternative based on comments on apache.sh:
#!/bin/bash

yum update -y
yum install -y httpd php mysql php-mysqlnd
service httpd start
chkconfig httpd on
echo "fs-e7bfb767.efs.us-east-1.amazonaws.com:/ /var/www/html nfs4 nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 0 0" >> /etc/fstab
mount -a

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