Created
November 20, 2019 02:52
-
-
Save eaconde/16211fd528c2e1e0cf8f5812ea6ce82e to your computer and use it in GitHub Desktop.
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 | |
yum -y update | |
yum install -y ruby aws-cli -y | |
cd /home/ec2-user | |
aws s3 cp s3://aws-codedeploy-us-east-1/latest/install . --region us-east-1 | |
chmod +x ./install | |
./install auto | |
service codedeploy-agent stop | |
##adduser username <--- this is only required if you use a username that does not already exist | |
sed -i 's/""/"ec2-user"/g' /etc/init.d/codedeploy-agent | |
##sed -i 's/#User=codedeploy/User=ec2-user/g' /usr/lib/systemd/system/codedeploy-agent.service <--- Uncomment this line for Amazon Linux 2 | |
chown ec2-user:ec2-user -R /opt/codedeploy-agent/ | |
chown ec2-user:ec2-user -R /var/log/aws/ | |
service codedeploy-agent start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment