跳到主要內容

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/$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.

留言

這個網誌中的熱門文章

3M UVA3000 更換濾芯紫外線燈匣

用了一年的3M濾水器提示說要換濾芯和燈匣 上 Youtube 想找教學的影片可是沒看到 UVA 3000 的 經過了一番奮戰後在這邊記錄一下 希望可以幫助後人,以免再重蹈覆轍。 Step 1. 拔掉插頭,把淨水器從牆上拿下來(基本上他是掛著而已),比較方便施工。 Step 2. 把前蓋往上拉,很容易就可以看到裡面的東西了。 Step 3. 打開後可以看到有兩個柱狀體,左邊的是燈匣,右邊的是濾芯。 Step 4. 這裡有個祕技是,這兩個柱狀體是可以往上 翻開30 度左右,這樣就可以有比較大的空間施工。 Step 4. 更換濾芯的話,柱狀體的瓶身上有箭頭,往左就是轉開,往右就是鎖緊。 Step 5. 更換燈匣的話比較麻煩一點,因為他底部是電源,頂部的右邊有個突出來的小方塊。對照淨水器上方連接處的話會有個弧形的凹槽,這是要 match 的.如果你只注意瓶身的箭頭往右鎖回去,就會造成漏水...Orz... Step 6. 把前蓋蓋回,機器掛回牆上,插插頭,開水,如果機器沒有告訴你有燈匣異常或漏水的話,就可以長按 C / UV  Reset 計數器了. 所以關鍵字就是,要往上翻 30 度,燈匣上面的小凸點要在右側,要看瓶身的 小箭頭. May it helps!

Angular 2

Angular 2 似乎不錯的樣子? ECMAScript 6 的 class 和 Angular 2 語法的大改版 感覺似乎直覺多了... 從 Server Side 的 PHP Framework + jQuery 換成 Angular 2 的純 Frontend 可以真正擺脫後端做一套, 前端又要做半套 然後又難以測試的問題嗎? 或許 Angular 2 是一個值得投資時間關注的新方式? Angular 2 Preparation - Part 1 - Code Structure Comparison Free New Angular 2 Preparation Course An Angular2 Todo App: First look at App Development in Angular2 https://angular.io

chrome java plugin on windows 7 64 bit

Chrome and Firefox on windows 7 64 bit OS both are only support 32 bit application. Therefore, if you want to install java plugin in Firefox and Chrome, you need to install java jre 32 bit version instead of 64 bit. Another thing is if after jave jre installation, in java testing page, you still keep asking to install jave plugin, it might caused by some chrome plugins blocks the jave plugin installation. you can use "about:plugins" to disable some plugin or in extension page remove some extenstions.