跳到主要內容

發表文章

目前顯示的是有「Amazon」標籤的文章

Access previous(old) version Amazon Linux AMI repository

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/ $releasever 2013.03 /main/mirror.list #vi /etc/yum.d/amzn-updates.repo mirrorlist=http://repo.us-east-1.amazonaws.com/ $releasever 2013.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.