跳到主要內容

發表文章

目前顯示的是 七月, 2013的文章

MongoDB安裝好的一些貼心小提示

記錄一下,免得忘了找不到...
# brew install mongodb Warning: It appears you have MacPorts or Fink installed. Software installed with other package managers causes known problems for Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again. ==> Downloading http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.0.5.tgz ######################################################################## 100.0%==> Caveats If this is your first install, automatically load on login with: mkdir -p ~/Library/LaunchAgents     cp /usr/local/Cellar/mongodb/2.0.5-x86_64/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/     launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
If this is an upgrade and you already have the homebrew.mxcl.mongodb.plist loaded: launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist     cp /usr/local/Cellar/mongodb/2.0.5-x86_64/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/     launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
O…

AWS CLI Developer Preview

雖然AWS是指標性的公有雲提供商,但是....受不了AWS傳統CLI Tool的超長指令了嗎...(對...真的很長@@)

AWS的進步,大家看得到... 應該很快就會Release的新版CLI: 網址:http://aws.amazon.com/cli/

安裝:
新版本的CLI是綁訂在Python上,應該是考慮到操作REST的方便性... (如果是用Node.js實作,我會更愛它...)。安裝是透過Python的Package installer:pip或是easy_install


操作:
操作當然是相當的...不簡單啦,原則上是透過一個指令"aws"加上service name,例如: ec2,然後中間穿插options以及操作等等... 打aws後按enter會出現提示:


而進入到ec2的操作模式後,則可以直接打help觀看該service的man page....


上述操作都還不到連線到AWS的部份,真正要執行連線時,需要設定access key與secret access key的環境變數... 指令如下:
export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...

設定完成後,就可以真正執行裡面的指令:


而回傳的值部分,也是以json為主的結果字串,如果想要取出裡面得值,可以透過jsontool來操作(http://opennodes.github.io/wiki/index.html?page=jsontool.md)
另外,Node.js的開發者也是有福的啦...(雖然不是新消息@@),AWS for Node.js的SDK可以在下面網址找到:https://github.com/aws/aws-sdk-js