-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_codedeploy.sh
More file actions
30 lines (24 loc) · 938 Bytes
/
install_codedeploy.sh
File metadata and controls
30 lines (24 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
yum update -y;
# Install/Start CodeDeploy
yum install -y ruby wget
cd /home/ec2-user
wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/install
chmod +x ./install
sudo ./install auto
service codedeploy-agent start
# Install PHP7, MySQL, and Opcache
# http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
yum install -y httpd24 php70 mysql56-server php70-mysqlnd php70-cli php70-opcache php70-gd
service httpd start
# Download Drupal 8
cd /var/www/html && curl -fSL "https://ftp.drupal.org/files/projects/drupal-8.3.2.tar.gz" -o drupal.tar.gz \
&& echo "d1fce1ec78ca1bcde4a346f4c06531b4 *drupal.tar.gz" | md5sum -c - \
&& tar -xz --strip-components=1 -f drupal.tar.gz \
&& rm -f drupal.tar.gz
# Public images/files directory
mkdir /var/www/html/sites/default/files
chmod -R 777 /var/www/html/sites/default/files
# Add www group and ecs-user ot group
groupadd www
usermod -a -G www ec2-user