小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

Mac OS 安裝 Homebrew 和 MongoDB

 CevenCheng 2012-03-23

Mac OS 安裝 Homebrew 和 MongoDB

作者:Jerry 發(fā)布于:2011-11-17 14:12 Thursday 分類:開發(fā)

Homebrew

Homebrew 是一個簡單方便的能夠在 Apple Mac OS X 下安裝 Unix 工具的程序。

安裝方式比較簡單,只需要在終端下直接輸入:

jerry-mac:~ jerry$ /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

但是,由于權(quán)限的問題,可能會提示問題:

-e:66: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040766

-e:77: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040766

調(diào)整目錄的讀寫權(quán)限:

$ sudo chmod o-w /usr/local/bin

$ sudo chmod o-w /usr/local

重新嘗試,

jerry-mac:~ jerry$ /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

==> This script will install:

/usr/local/bin/brew

/usr/local/Library/Formula/...

/usr/local/Library/Homebrew/...

==> The following directories will be made group writable:

/usr/local/.

/usr/local/bin

==> The following directories will have their group set to admin:

/usr/local/.

/usr/local/bin

Press enter to continue

==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin

==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/. /usr/local/bin

==> Downloading and Installing Homebrew...

==> Installation successful!

Now type: brew help

安裝成功。

更新軟件庫清單:

jerry-mac:~ jerry$ brew update

Initialized empty Git repository in /usr/local/.git/

remote: Counting objects: 48129, done.

remote: Compressing objects: 100% (21482/21482), done.

remote: Total 48129 (delta 30258), reused 41855 (delta 25975)

Receiving objects: 100% (48129/48129), 6.72 MiB | 170 KiB/s, done.

Resolving deltas: 100% (30258/30258), done.

From https://github.com/mxcl/homebrew

 * [new branch]      gh-pages   -> origin/gh-pages

 * [new branch]      master     -> origin/master

HEAD is now at cbcaa4d gpac: make lowercasing binaries an option

Already up-to-date.

MongoDB

創(chuàng)建數(shù)據(jù)目錄,更改權(quán)限:

jerry-mac:~ jerry$ sudo mkdir -p /data/db/

jerry-mac:~ jerry$ sudo chmod -R 777 /data/db/

方式1:通過 Homebrew 安裝

$ brew install mongodb

方式2:解壓縮安裝包

下載地址:http://www./downloads

解壓縮安裝包,啟動 MongoDB Server

$ ./mongodb-xxxxxxx/bin/mongod

測試下連接:

jerry-mac:bin jerry$ ./mongo

MongoDB shell version: 2.0.1

connecting to: test

> db.foo.save({a:1})

> db.foo.find()

{ "_id" : ObjectId("4ec48e59b4ce9fde1a0edea3"), "a" : 1 }

標簽: Mac MongoDB

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多