MongoDB 安裝(一)

來源:互聯網
上載者:User

標籤:

windows 8安裝 mongodb

1.下載安裝包

http://www.veryhuo.com/down/html/mongodb.html

2.解壓到D:/MongoDB目錄下。

3.把D:/MongoDB/bin加到系統內容變數的path中。

4.管理員身份開啟cmd,鍵入以下命令:

 

mongod --dbpath D:/MongoDB/data  注意:先在d:\mongodb的檔案夾內建立data檔案夾

執行完畢後.瀏覽器中開啟http://localhost:27017

It looks like you are trying to access MongoDB over HTTP on the native driver port.安裝完畢。

5.如果需要將資料庫作為服務運行.關閉命令提示字元視窗。重新開啟一個新的cmd 鍵入命令

mongod --logpath D:\MongoDB\logs\MongoDB.log --logappend --dbpath D:\MongoDB\data --directoryperdb --serviceName MongoDB --install

記錄檔:D:\MongoDB\logs\MongoDB.log

資料檔案目錄:D:\MongoDB\data,並且參數--directoryperdb說明每個DB都會建立一個目錄

Windows服務的名稱:MongoDB

開啟服務列表探索服務已經安裝成功。

 

 

安裝完畢,下面在說說C#代碼操作mongodb。



 

MongoDB 安裝(一)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.