首页 > 系统 > Win7 > 正文

win7安装mongodb及命令运行教程

2020-03-11 02:18:08
字体:
来源:转载
供稿:网友
1:先上官网:http://www.mongodb.org/downloads 下载最新的:

 

下载完后文件名为:mongodb-win32-x86_64-2.4.6.zip解压到当你要安装的目录,然后我把目录名给改短了一下,叫mongodb246,放在了e盘下。2:用cmd运行目录下bin下的mongod.exe来安装服务:

--reinstall 是重新安装,首次安装没有开--reset参数,所以用了重装参数。

--install 是安装。 

 

另外中间我犯了一个错,把logpath 弄成了文件夹(本应该是一个文件名称),结果搞了一个失败的服务,还删不掉。。悲催。

(后来重启电脑后,那个删不掉的服务自己消失了)

具体的参数如下,比较多,简单的就是像我上面的图一样,参考着写就可以了:

如果看不懂E文,可以复制拿去Google翻译文档。 


复制代码代码如下:
E:/mongodb246/bin>mongod.exe -help
Allowed options:</p><p>General options:
-h [ --help ] show this usage information
--version show version information
-f [ --config ] arg configuration file specifying additional options
-v [ --verbose ] be more verbose (include multiple times for more
verbosity e.g. -vvvvv)
--quiet quieter output
--port arg specify port number - 27017 by default
--bind_ip arg comma separated list of ip addresses to listen on
- all local ips by default
--maxConns arg max number of simultaneous connections - 20000 by
default
--logpath arg log file to send write to instead of stdout - has
to be a file, not directory
--logappend append to logpath instead of over-writing
--pidfilepath arg full path to pidfile (if not set, no pidfile is
created)
--keyFile arg private key for cluster authentication
--setParameter arg Set a configurable parameter
--auth run with security
--cpu periodically show cpu and iowait utilization
--dbpath arg directory for datafiles - defaults to /data/db/
--diaglog arg 0=off 1=W 2=R 3=both 7=W+some reads
--directoryperdb each database will be stored in a separate
directory
--ipv6 enable IPv6 support (disabled by default)
--journal enable journaling
--journalCommitInterval arg how often to group/batch commit (ms)
--journalOptions arg journal diagnostic options

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表