博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MongoDB - Installing MongoDB on Windows
阅读量:5241 次
发布时间:2019-06-14

本文共 2663 字,大约阅读时间需要 8 分钟。

 

1. 在  选择下载所需的版本。

2. 执行 msi 安装包,可通过 Custom 选项,选择安装目录。

3. 创建数据目录。MongoDB 需要一个存储数据的目录,如果不指定, Windows 环境默认使用 c:\data\db。

D:\>mkdir data\db

4. 运行服务。

D:\Program Files\MongoDB\Server\3.2\bin>mongod.exe --dbpath D:\data\db

5. 运行MongoDB Shell。

 

MongoDB 启动选项

以下的选项都可以从  获得更详细的参考。

--help, -h

  This returns the information on the options and use of mongod.

--version

  This returns the mongod release number.

--config <filename>

  This specifies the configuration file to be used by mongod.

--port <port>

  This specifies the TCP listening port on which MongoDB listens. (the default is 27017)

--bind_ip <ip address>

  This specifies the IP address that mongod binds to in order to listen for connections from applications (the default is All interfaces.).

--logpath <path>

  This sends all diagnostic logging information to a log file instead of to a standard output or to the host's syslog system.

--logappend

  This appends new entries to the end of the log file rather than overwriting the content of the log when the mongod instance restarts.

--httpinterface

  This enables the HTTP interface. Enabling the interface can increase network exposure.

--fork

  This enables a daemon mode that runs the mongod process in the background. By default, mongod does not run as a daemon.

--auth

  This enables authorization to control the user's access to database resources and operations. When authorization is enabled, MongoDB requires all clients to authenticate themselves first in order to determine the access for the client.

--noauth

  This disables authentication. It is currently the default and exists for future compatibility and clarity

--rest

  This enables the simple REST API. Enabling the REST API enables the HTTP interface, even if the HTTP interface option is disabled, and as a result can increase network exposure.

--profile <level>

  This changes the level of database profiling (0 Off, which means no profiling; 1 On, which only includes slow operations; and 2 On, which includes all the operations.)

--shutdown

  This safely terminates the mongod process. It is available only on Linux systems.

--dbpath <path>

  This is the directory where the mongod instance stores its data. The default is /data/db on Linux and OS X and C:\data\db on Windows.

--storageEngine string

  This specifies the storage engine for the mongod database. The valid options include mmapv1 and wiredTiger. The default is mmapv1.

--directoryperdb

  This stores each database's files in its own folder in the data directory. When applied to an existing system, the --directoryperdb option alters the storage pattern of the data directory.

 

转载于:https://www.cnblogs.com/huey/p/6104333.html

你可能感兴趣的文章
【资源下载】Ext4.1.0_Doc中文版_V1.0.0_Beta正式提供下载!
查看>>
ThinkPHP 3.2.3 数据缓存与静态缓存
查看>>
挑战(一):两周自己动手写CPU(1)
查看>>
【生活大小事】空调事件
查看>>
多线程编程学习一(Java多线程的基础).
查看>>
fk输入地壳模型容易出错的地方
查看>>
web调用客户端程序
查看>>
Shell、Bash、Terminal爱恨情仇
查看>>
P1551 亲戚
查看>>
vs输出窗口,显示build的时间
查看>>
Spring学习笔记(二) 初探Spring
查看>>
Mongo——C#操作
查看>>
Xcode 自动打包之旅【本文摘自智车芯官网】
查看>>
Mac下WorkPress平台的安装与搭建
查看>>
QtCreator添加第三方头文件和类库
查看>>
安全删除安卓系统自带软件
查看>>
抓包工具PowerSniff-0.1
查看>>
旅游项目问题以及解决汇总
查看>>
R in action读书笔记(21)第十六章 高级图形进阶(上)
查看>>
IIS项目发布完整流程
查看>>