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. CSS之利用text-indent隐藏文字用图片当Login

    html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w ...

  2. 【java】 linux下利用nohup后台运行jar文件包程序

    Linux 运行jar包命令如下: 方式一: java -jar XXX.jar 特点:当前ssh窗口被锁定,可按CTRL + C打断程序运行,或直接关闭窗口,程序退出 那如何让窗口不锁定? 方式二 ...

  3. 获取本机MAC地址

    <%@ page contentType="text/html; charset=GBK" %><html><head><meta htt ...

  4. 5、StringBuffer与StringBuilder的区别(十进制转二进制)

    1. 在执行速度方面的比较:StringBuilder > StringBuffer 2. StringBuffer与StringBuilder,他们是字符串变量,是可改变的对象,每当我们用它们 ...

  5. Linxu IO测试软件

    fio 安装 apt-get install fio fdisk -l Device Boot Start End Blocks Id System/dev/sda1 * 2048 968390655 ...

  6. 为什么要用Maven?

    早期还在学怎么用Ant构建项目时,就有看到说Maven是Ant的替代品,但真正意义去了解Maven,还是因为以前的公司一老员工在做OpenJMS二次开发时,从网上下载了源码,然后用Maven构建它. ...

  7. Tomcat - SSL操作大全

    简介 制作CSR申请文件 安装证书文件 客户证书认证 证书的备份(导出) 证书的恢复(导入)   简介 Tomcat 服务器是一个免费的开放源代码的Web 应用服务器,目前最新版本是6.0.20(截止 ...

  8. delphi中Message消息的使用方法

    实例1 unit Unit1; interface   uses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls ...

  9. Arch命令行与安装包

    >>mkfs.vfat                                                                     # pacman -S do ...

  10. hive和ORACLE语法对比