learn-cantrill-io-labs
learn-cantrill-io-labs copied to clipboard
Issue with SSM Agent installation on Centos
Lesson - https://github.com/acantril/learn-cantrill-io-labs/blob/master/aws-patch-manager/02_LABINSTRUCTIONS/STAGE2%20-%20AWS%20Managed%20Instances.md
This below command fails on Centos,
[centos@ip-10-16-0-105 ~]$ sudo dnf install -y https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/latest/linux_amd64/amazon-ssm-agent.rpm
CentOS-8 - AppStream 41 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
Hi @kensplanet - running the following two commands worked for me. It points to the mirrorlist which is currently available. Centos has reached EOL so the default mirror list is removed.
sudo sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
sudo sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
These commands may not work after another few months. They are working as of March 2022.
Nov 2022 baseurl for /etc/yum.repos.d/CentOS-AppStream.repo
http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/
baseurl for /etc/yum.repos.d/CentOS-Base.repo
http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/