環境
- EC2
- Amazon Linux 2
ルートユーザーとしてログインする
sudo su -
shellを作成する
vi install.sh
以下のコードを貼り付ける
#!/bin/bash
sudo yum update
sudo yum install ruby
sudo yum install wget
cd /home/ec2-user
wget https://aws-codedeploy-ap-northeast-1.s3.ap-northeast-1.amazonaws.com/latest/install
chmod +x ./install
./install auto
実行権限を付与
chmod +x install.sh
install.shを実行
./install.sh