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. DOM节点关系,节点关系

    DOM节点关系 定义 节点中的各种关系可以用传统的家族关系来描述,相当于把文档树比喻成家谱. 属性 [nodeType.nodeName.nodeValue] 每个节点都有这三个属性,且节点类型不同, ...

  2. Mac 下 Intellij IDEA 2016.1.2+maven+jetty+ JRebel 6.4.3 破解+spring mvc

    准备阶段:  Intellij IDEA 2016.1.2 (官方下载,作者下载的是社区版): JRebel for IntelliJ插件安装,可选择在线安装,在线安装的是最新版,我选择本地安装, 下 ...

  3. Python - 异步IO\数据库\队列\缓存

    协程 协程,又称微线程,纤程.英文名Coroutine.一句话说明什么是线程:协程是一种用户态的轻量级线程,协程一定是在单线程运行的. 协程拥有自己的寄存器上下文和栈.协程调度切换时,将寄存器上下文和 ...

  4. MySQL下载及安装

    MySQL官网  http://dev.mysql.com/downloads/ Download --> Community --> MySQL Community Server 选择操 ...

  5. ZooKeeper程序员指南(转)

    译自http://zookeeper.apache.org/doc/trunk/zookeeperProgrammers.html 1 简介 本文是为想要创建使用ZooKeeper协调服务优势的分布式 ...

  6. Android学习笔记(一)

    活动(Actiity)是一种可以包含用户界面的组件,主要用于和用户进行交互.一个应用中可以包含零个或多个活动. 所有的自己写Activity都继承于Activity类.项目中的任何活动都应该改重写Ac ...

  7. 一个简单的CORBA例子

    因为对CORBA分析的需要,这里写一个简单的CORBA例子.从JDK1.2开始,JDK中集成了ORB的实现,本例子使用了JDK1.7,对于JDK1.2+应该都没有问题.这个例子实现一个简单的加减乘除的 ...

  8. php数据库访问

    从$res获取行数据的时候,处理mysql_fetch_row($res),还有三个方法,分别是 mysql_fetch_row($res); 返回一个所以的数组,速度较快. mysql_fetch_ ...

  9. MySQL绿色版安装(mysql-5.7.12-win32)

    1. 从官网下载安装包:mysql-5.7.12-win32.zip 2. 解压到C盘(任意盘符都行) C:\mysql-5.7.12-win32 3. 修改配置文件:C:\mysql-5.7.12- ...

  10. 55. Set Matrix Zeroes

    Set Matrix Zeroes (Link: https://oj.leetcode.com/problems/set-matrix-zeroes/) Given a m x n matrix, ...