DS243229 林理穂子 作業記録

作業記録 - 2025年7月12日

実施した作業

作業詳細

AWSアカウントの作成

EC2インスタンスの作成

SSHログイン

chmod 600 ~/Downloads/mau-diy.pem
ssh -i ~/Downloads/mau-diy.pem ec2-user@52.195.187.213
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
[ec2-user@ip-172-31-4-246 ~]$

EC2 Amazon Linuxの設定

sudo yum update -y
Dependencies resolved.
Nothing to do.
Complete!
[ec2-user@ip-172-31-4-246 ~]$
sudo timedatectl set-timezone Asia/Tokyo
[ec2-user@ip-172-31-4-246 ~]$ timedatectl
Local time: Sat 2025-07-12 15:07:54 JST
Universal time: Sat 2025-07-12 06:07:54 UTC
RTC time: Sat 2025-07-12 06:07:53
Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
[ec2-user@ip-172-31-4-246 ~]$
sudo localectl set-locale LANG=ja_JP.UTF-8
[ec2-user@ip-172-31-4-246 ~]$ localectl status
System Locale: LANG=ja_JP.UTF-8
VC Keymap: (unset)
X11 Layout: (unset)
[ec2-user@ip-172-31-4-246 ~]$

Webサーバ(Apache)のインストールと設定

sudo yum install -y httpd
sudo systemctl start httpd
sudo systemctl enable httpd

作業記録をhtmlに変換し, EC2上のWebサーバで公開

scp -i ~/Downloads/mau-diy.pem ~/Downloads/index.html ec2-user@52.195.187.213:/tmp/
Complete!
[ec2-user@ip-172-31-4-246 ~]$ sudo systemctl start httpd
[ec2-user@ip-172-31-4-246 ~]$ sudo systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
[ec2-user@ip-172-31-4-246 ~]$ scp -i ~/Downloads/mau-diy.pem ~/Downloads/index.html ec2-user@52.195.187.213:/tmp/
Warning: Identity file /home/ec2-user/Downloads/mau-diy.pem not accessible: No such file or directory.
The authenticity of host '52.195.187.213 (52.195.187.213)' can't be established.
ED25519 key fingerprint is SHA256:uCnqoNOD15YgGv/y28hzmfXUK/09RVuCr8z3acjJ1+Y.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '52.195.187.213' (ED25519) to the list of known hosts.
ec2-user@52.195.187.213: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Connection closed
ssh -i ~/Downloads/mau-diy.pem ec2-user@52.195.187.213
sudo mv /tmp/index.html /var/www/html/index.html

中間課題 - 7月16日追記

今後EC2を使用してチャレンジしたいこと

APIの活用

画像・CSS・jsを用いたデザイン要素の公開

API・画像・CSS・jsを用いたサイトのイメージ