Last active
June 15, 2021 09:15
laravel & php 7.3 & mysql install on amazon linux ami2
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
#!/bin/bash | |
sudo yum update | |
## mkswap | |
## see https://aws.amazon.com/ko/premiumsupport/knowledge-center/ec2-memory-swap-file/ | |
sudo dd if=/dev/zero of=/swapfile bs=1G count=4 | |
## install python3, php, nginx, redis | |
sudo amazon-linux-extras install python3 php7.3 nginx1 redis4.0 epel | |
## install php extension | |
sudo yum install php-fpm php-cli php-common php-gd php-mbstring \ | |
php-mysqlnd php-pdo php-fpm php-xml php-opcache php-zip php-process php-sqlite \ | |
php-bcmath php-intl | |
## install composer | |
sudo yum install composer | |
systemctl enable php-fpm | |
systemctl restart php-fpm | |
## install certbot | |
sudo yum install certbot python2-certbot-nginx | |
## install mysql | |
sudo wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm | |
sudo yum localinstall mysql57-community-release-el7-11.noarch.rpm | |
sudo yum install mysql-community-server | |
systemctl enable mysqld.service | |
systemctl start mysqld.service | |
## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks! helped me getting php73 on my AMI2