2017-02-24 1 views
2

/security/authorization.cnf 파일에서 "security : authorization : enabled"옵션의 주석을 제거 할 때 mongod를 시작할 수 없습니까? on mongodb 3.4.2 on centos6.5;mongod.conf에서 공개 인증을 할 때 mongodb를 시작할 수 없습니다.

# 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: 

답변

0

모든 방금 공간을 누락 괜찮 다음 commond 프린트 아웃 여기에 있습니다 :이

sudo service mongod restart 
Stopping mongod:           [ OK ] 
Starting mongod:           [FAILED] 

내 mongod.conf 파일은 다음과 같습니다

은 commond 인쇄 밖으로 키워드를 사용하도록 설정하십시오. 공간

```

security: 
    authorization: enabled 
보안에 대한 위의 코드와 코드로 교체```이전

를 활성화 매우 중요합니다. 누군가를 찾아 내고 희망적으로 도울 것입니다.

관련 문제