如何将mongodb注册为windows服务?


  • 註冊用戶

    如何将mongodb注册为windows服务?


  • Lv 1

    @Jerry

    使用 mongod.exe 的 --install


  • 註冊用戶

    這裡有提到 MongoDB 註冊 Windows 服務的指令

    https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/#install-the-mongodb-service


  • Lv 1

    把連結文直接貼上來

    4

    Install the MongoDB service.

    IMPORTANT

    Run all of the following commands in Command Prompt with “Administrative Privileges”.

    Install the MongoDB service by starting mongod.exe with the --install option and the -configoption to specify the previously created configuration file.

    "C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe" --config "C:\Program Files\MongoDB\Server\3.4\mongod.cfg" --install
    

    To use an alternate dbpath, specify the path in the configuration file (e.g. C:\mongodb\mongod.cfg) or on the command line with the --dbpath option.

    If needed, you can install services for multiple instances of mongod.exe or mongos.exe. Install each service with a unique --serviceName and --serviceDisplayName. Use multiple instances only when sufficient system resources exist and your system design requires it.


登录后回复
 

与 萌阔论坛 的连接断开,我们正在尝试重连,请耐心等待