当我在/etc/mongod.conf上取消对"security:authorization:enabled“选项的注释时,我无法启动mongod?基于Centos6.5的mongodb 3.4.2
这是普通的打印输出:
sudo service mongod restart
Stopping mongod: [ OK ]
Starting mongod: [FAILED]这是我的mongod.conf文件:这是普通的打印输出:
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# Where and how to store data.
storage:
dbPath: /var/lib/mongo
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# how the process runs
processManagement:
fork: true # fork and run in background
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
# network interfaces
net:
port: 58018
bindIp: 127.0.0.1 # Listen to local interface only, comment to listen on all interfaces.
#security: <---uncomment here will start failed
# authorization:enabled <---uncomment here will start failed
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options
#auditLog:
#snmp:发布于 2017-07-21 15:38:47
一切都很好,只是在enabled关键字前缺少了一个空格。在启用前,空间非常重要
```javascript安全性:
授权:已启用
出于安全性考虑,请将您的代码段替换为上面的代码段。它很难找到,希望能对某些人有所帮助。
发布于 2018-06-13 20:23:05
我使用的是'MongoDB服务器版本: 3.6.5‘,这个版本适用于我:
security.authorization: enabledhttps://stackoverflow.com/questions/42428890
复制相似问题