Develop

Amazon Linux 2023 AMI 와 변경사항

kenu허광남 2023. 6. 14. 06:08

인프런 CI/CD 강의 관련한 내용입니다.

우선 급하게 공유합니다.

올해 2023/03/15에Amazon Linux 2023 (AL2023)이 나온 이후로 nginx와 HTTPS 설정의 명령이 바뀌었습니다.

Amazon Linux 2 (AL2)에 있던amazon-linux-extras명령은 삭제되었기 때문에 nginx 설치는 다음과 같이 바뀝니다.

# sudo amazon-linux-extras install nginx1 #AL2
sudo yum install nginx

그리고 가장 변화가 많은 부분은 다음입니다.

04. 도메인 등록과 HTTPS 설정일부

pip기준으로 certbot 설치가 가능합니다.

# Amazon Linux 2023
sudo su -
dnf install python3 augeas-libs
dnf remove certbot
python3 -m venv /opt/certbot/
/opt/certbot/bin/pip install --upgrade pip
/opt/certbot/bin/pip install certbot certbot-nginx
ln -s /opt/certbot/bin/certbot /usr/bin/certbot

certbot --nginx
systemctl restart nginx

 

기존Amazon Linux 2 (AL2)는 다음과 같습니다.

# Amazon Linux 2
sudo su -
yum -y install yum-utils
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install certbot python2-certbot-nginx

certbot --nginx
systemctl restart nginx

도움이 되기를 바랍니다. 🙏

참고

 

Amazon Linux 2023이 GA되었습니다! | DevelopersIO

2023/03/15에 GA된 Amazon Linux 2023에 대한 소개와 기존의 Amazon Linux 2와 차이점에 대한 블로그입니다.

dev.classmethod.jp

* https://www.omglinux.com/amazon-linux-2023-released/

 

Amazon Linux 2023 is a Cloud-Optimized Linux Distro - OMG! Linux

Amazon this week announced the release of Amazon Linux 2023, the latest version of its homegrown Linux distribution for cloud workloads. Amazon Linux is a

www.omglinux.com