Since Amazon Linux AMI will update about every 6 month.
If you need to keep repository in some specific version.
i.e. if the latest is 2013.09, and you want to stay in 2013.03, you can change the repository file to some specific version.
#vi /etc/yum.d/amzn-main.repo
mirrorlist=http://repo.us-east-1.amazonaws.com/$releasever2013.03/main/mirror.list
#vi /etc/yum.d/amzn-updates.repo
mirrorlist=http://repo.us-east-1.amazonaws.com/$releasever2013.03/updates/mirror.list
#yum clean metadata
#yum search kernel-devel --showduplicates
Another tips regarding Amazon Linux is: if you use python platform.dist() to check distribution information. You will get empty string. However, I think you can use os.path.exists("/etc/image") to check if it is a AmazonLinux. That file contains detail information and it should only exists in AmazonLinux.
If you need to keep repository in some specific version.
i.e. if the latest is 2013.09, and you want to stay in 2013.03, you can change the repository file to some specific version.
#vi /etc/yum.d/amzn-main.repo
mirrorlist=http://repo.us-east-1.amazonaws.com/
#vi /etc/yum.d/amzn-updates.repo
mirrorlist=http://repo.us-east-1.amazonaws.com/
#yum clean metadata
#yum search kernel-devel --showduplicates
Another tips regarding Amazon Linux is: if you use python platform.dist() to check distribution information. You will get empty string. However, I think you can use os.path.exists("/etc/image") to check if it is a AmazonLinux. That file contains detail information and it should only exists in AmazonLinux.
留言
張貼留言