From c21b34f5fec8a837ba84e08d30092569a98788dd Mon Sep 17 00:00:00 2001 From: Stefano Date: Fri, 23 May 2025 13:26:31 -0500 Subject: [PATCH] Fixed packages installation to conform with Amazon Linux 2023 --- infrastructure/userdata.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/infrastructure/userdata.sh b/infrastructure/userdata.sh index db8a3e0..49d5361 100644 --- a/infrastructure/userdata.sh +++ b/infrastructure/userdata.sh @@ -1,11 +1,12 @@ #!/bin/sh -yum update -y -yum install -y python3-pip git -amazon-linux-extras install nginx1 +# Update system and install required packages +dnf update -y +dnf install -y python3-pip git cronie nginx certbot python3-certbot-nginx -pip3 install --upgrade pip -pip3 install certbot certbot-nginx +# Start and enable crond service +systemctl start crond +systemctl enable crond cd /home/ec2-user