美文网首页我爱编程
将MongoDB以Windows Service运行

将MongoDB以Windows Service运行

作者: kamionayuki | 来源:发表于2016-10-31 15:11 被阅读31次

    From:这里

    MongoDB以Windows Service运行##

    1. 以Administrator身份打开CMD并输入以下命令cd your\MongoDB\setup\path\bin
    2. 然后输入
      mongod --logpath your\MongoDB\log\path\log_file_name.log --logappend --dbpath your\MongoDB\db\path\ --directoryperdb --serviceName MongoDB --install

    • 启动 MongoDB服务:net start MongoDB
    • 停止 MongoDB服务:net stop MongoDB
    • 删除 MongoDB服务:sc delete MongoDB

    相关文章

      网友评论

        本文标题:将MongoDB以Windows Service运行

        本文链接:https://www.haomeiwen.com/subject/mwrputtx.html