Created
December 9, 2021 19:31
-
-
Save javatask/1df19642bad34ed27c4faf082c5ceb7a to your computer and use it in GitHub Desktop.
User data script for AWS EC2 instance based on AMI2
This file contains hidden or 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 -y update | |
sudo amazon-linux-extras install -y php7.4 | |
sudo yum install -y php-cli php-pdo php-fpm php-json php-mysqlnd php-dom php-gd php-simplexml php-xml php-opcache php-mbstring httpd | |
wget https://www.drupal.org/download-latest/tar.gz | |
tar -xzf tar.gz | |
mv drupal-* drupal | |
cd drupal | |
sudo rsync -avz . /var/www/html | |
sudo chown -R apache:apache /var/www/html | |
sudo service httpd restart | |
# Manually change to configure clean URL | |
# sudo nano /etc/httpd/conf/httpd.conf set AllowOverride All for /var/www/html | |
# sudo systemctl restart httpd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment