Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/mongodb/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
can';在mongod.conf上打开auth时,无法启动mongodb_Mongodb_Centos6.5 - Fatal编程技术网

can';在mongod.conf上打开auth时,无法启动mongodb

can';在mongod.conf上打开auth时,无法启动mongodb,mongodb,centos6.5,Mongodb,Centos6.5,在/etc/mongod.conf上取消注释“security:authorization:enabled”选项时,我无法启动mongod? 关于mongodb 3.4.2 世纪6.5 这是常见的打印输出: sudo service mongod restart Stopping mongod: [ OK ] Starting mongod:

在/etc/mongod.conf上取消注释“security:authorization:enabled”选项时,我无法启动mongod? 关于mongodb 3.4.2 世纪6.5

这是常见的打印输出:

sudo service mongod restart
Stopping mongod:                                           [  OK  ]
Starting mongod:                                           [FAILED]
# 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:
这是我的mongod.conf文件: 以下是常见的打印输出:

sudo service mongod restart
Stopping mongod:                                           [  OK  ]
Starting mongod:                                           [FAILED]
# 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:
#mongod.conf
#有关所有选项的文档,请参阅:
#   http://docs.mongodb.org/manual/reference/configuration-options/
#在何处写入日志数据。
系统日志:
目的地:文件
logAppend:true
路径:/var/log/mongodb/mongod.log
#在何处以及如何存储数据。
存储:
dbPath:/var/lib/mongo
期刊:
已启用:true
#发动机:
#mmapv1:
#有线电视:
#流程如何运行
流程管理:
fork:true#fork并在后台运行
pidFilePath:/var/run/mongodb/mongod.pid#pidfile的位置
#网络接口
净:
港口:58018
bindIp:127.0.0.1#只听本地接口,评论所有接口。

#安全性:一切正常您只是在启用关键字之前缺少一个空格。空间在启用之前非常重要

```

```

为安全起见,请使用上述代码段替换您的代码段。
很难找到它,希望它能帮助别人。

我使用的是“MongoDB服务器版本:3.6.5”,这个版本对我很有用:

security.authorization: enabled