Workaround to install as a service

You can manually install 2.6.0 as a service on Windows from an Administrator cmd prompt.

Assuming you have installed MongoDB using the MSI installer, the default path will be C:\Program Files\MongoDB 2.6 Standard. If you have installed in an alternative directory you will need to adjust the paths as appropriate.

Steps to install:

1) Open an Administrator command prompt

  • Windows 7 / Vista / Server 2008 (and R2)

    • Press Win + R, then type "cmd", then press Ctrl + Shift + Enter.
  • Windows 8 / 8.1
    • Press Win + X, then press A.

2. Make directories for your database and log files

mkdir c:\data\db
mkdir c:\data\log

3. Create a configuration file. This file can include any of the configuration options for mongod, but at a minimum must include a valid setting for logpath:

echo logpath=c:\data\log\mongod.log> "C:\Program Files\MongoDB 2.6 Standard\mongod.cfg"
echo dbpath=c:\data\db>> "C:\Program Files\MongoDB 2.6 Standard\mongod.cfg"

4. Create the MongoDB service

sc create MongoDB binPath= "\"C:\Program Files\MongoDB 2.6 Standard\bin\mongod.exe\" --service --config=\"C:\Program Files\MongoDB 2.6 Standard\mongod.cfg\"" DisplayName= "MongoDB 2.6 Standard" start= "auto"

Note that sc requires a space between "=" and the configuration values (eg "binPath= "), and a "\" to escape double quotes.

If this works you should see:

[SC] CreateService SUCCESS

5. Start the MongoDB service:

net start MongoDB

If successful you should be able to connect using the mongo shell. If the service did not start successfully, the log file should contain information to help you troubleshoot.

see more information.

win7 64位 mongodb2.6.0 安装服务启动的更多相关文章

  1. 【Qt开发】Win7 64位qt-windows-x86-msvc2015-5.6.0 DLL依赖库打包

    Win7 64位qt-windows-x86-msvc2015-5.6.0 DLL依赖库打包 今天开始系统的学习QT,第一个测试的问题就是在纯净的系统中如何正常运行,也就是找出QT生成的exe的依赖库 ...

  2. win7 64位的PHP5.4安装redis扩展

    先看phpinfo.php信息 可以看是 PHP5.4 VC9 TS Architecture x86 说明是x86的PHP,虽然系统是64位的,所以还是要下载x86的redis 然后Github下载 ...

  3. win7+64位笔记本 python3.6安装opencv3

    1.直接在cmd窗口下用pip,输入 pip install opencv-python 安装成功是如下界面: 不放心还可以验证下,方法是cmd窗口下输入python,然后输入 import cv2 ...

  4. win7 64位 php环境开启curl服务Call to undefined function

    无法使用curl_init(),一般情况问题可能出在没有去加载php的扩展文件php_curl.dll(windows操作系统),但是检查了一下系统配置,发现,环境下已经将php.ini文件里 ;ex ...

  5. Centos 6.5(64位) vim 8.0 安装

    转自:https://blog.csdn.net/sdoyuxuan/article/details/78825912 1 先得安装nurses库 yum list | grep "ncur ...

  6. win7 64位下redis的安装

    1.下载Redis安装包. 下载地址 https://github.com/MSOpenTech/redis,找到Release,点击前往下载页面,点击Redis-x64-3.2.100.msi下载. ...

  7. Win7 64位系统U盘安装Centos6.5双系统

    (win764位旗舰版系统 Centos6.5亲测成功) 安装前准备: U盘.软碟通(UltraISO).CentOS-6.5-x86_64-bin-DVD1(DVD 2只是一些软件,安装系统只要DV ...

  8. Win7 64位qt-windows-x86-msvc2015-5.6.0 DLL依赖库打包

    今天开始系统的学习QT,第一个测试的问题就是在纯净的系统中如何正常运行,也就是找出QT生成的exe的依赖库问题 网上搜了下可以简单粗暴的用 D:\Qt\Qt5.6.0\5.6\msvc2015\bin ...

  9. 【转】 VC++6.0 在Win7 64位下调试,Shift+F5无法退出

    Win7 64位VC++6.0调试代码无法关闭窗口解决方法 VC++6.0 在64位Windows7下调试的时候,再结束调试,程序无法退出,只能关闭VC++6.0 IDE环境. 问题描述:当我击F5开 ...

随机推荐

  1. 关于jQuery中的submit()函数

    关于jQuery中的submit()函数(绑定event handler or 触发event?) 今天在敲代码的时候无意间碰到了一个比较绕的问题(一个小师弟问的问题),思前想后都不明白,上午百度.谷 ...

  2. MySQL日志恢复误删记录

    1.查询日志是否开启 show variables like"log_"; 2.查询是用的哪个日志文件 show master status; 3.定位是在什么时间误删的 /usr ...

  3. oracle直通车第二周习题

    1.教材第二章课后作业 1,2,3,4题. 答:1. 创建一查询,显示与Blake在同一部门工作的雇员的项目和受雇日期,但是Blake不包含在内. 2. 显示位置在Dallas的部门内的雇员姓名.变化 ...

  4. csv文件批量导入数据到sqlite。

    csv文件批量导入数据到sqlite. 代码: f = web.input(bs_switch = {})  # bs_switch 为from表单file字段的namedata =[i.split( ...

  5. js json 与字符串 转换过程由于书写不统一规范引发的一个问题

    对于两个字符串: 字符串1:{title:{},tooltip:{trigger:"axis"},legend:{data:["新关注人数"]},calcula ...

  6. android studio新项目时提示:Plugin is too old, please update to a more recent version

    今天想写一个程序来测试一下android studo代码,但是创建好项目后,提示: Error:(1, 0) Plugin is too old, please update to a more re ...

  7. poj 2513 Colored Sticks trie树+欧拉图+并查集

    点击打开链接 Colored Sticks Time Limit: 5000MS   Memory Limit: 128000K Total Submissions: 27955   Accepted ...

  8. 整理: Android HAL

    这篇文章整理来自http://bbs.chinaunix.net/thread-3675980-1-1.html 在论坛中看到的Android HAL讨论,有个ID描述的比较清楚,摘录如下: temp ...

  9. ACM好书推荐

    年末感想之(渣渣的我)         仔细想想,搞比赛的日子4年有余了,确实不服老不行了,直到现在平均每天的题量都在3题左右.其实真想说,“渣渣的我”.做的题确实不少了,但是水平还是上不了档次.  ...

  10. 主机+虚拟机ubuntu+mini2440开发板互相ping通

    折腾这么久,终于将主机,虚拟机和开发板三者之间能够相互ping通,虽然还没有实现我要的功能,不管怎么说先将步骤简单的概括下,用交叉网线将开发板与主机相连,开发板与主机的ip要设置在同一网段内,在配置u ...