how to set mogodb in upstart service with authentication

后端 未结 4 1014
醉梦人生
醉梦人生 2021-01-07 09:45

I have created a superuser tom in mongodb v2.6.11 with username & password and now i want to add this at ubunt

4条回答
  •  春和景丽
    2021-01-07 10:11

    There is absolutely no need to fiddle with the startup files (which you really should not do unless you exactly know what you are doing) or install additional software for managing MongoDB.

    I'd rather suggest to read MongoDB's extensive documentation of the config file options.

    The only thing you need to do is to set

    auth=true
    

    for legacy config files or

    security:
      authorization: enabled
    

    for YAML config files in /etc/mongod.conf

提交回复
热议问题