I installed mongodb on my ubuntu 16.04 machine on aws using these instructions with a slight deviation: I ran the mongod process with sudo systemctl mongod start
as from what I have read, that works better with Ubuntu 16.04. I fiddled around a little, created a user, added
security: authentication: 'enabled'
edit:
security: authorization: 'enabled'
/edit
(with 2 spaces, 4 spaces, and a tab iteratively) to /etc/mongod.conf and went to restart with
sudo systemctl mongod restart
but now checking with netstat -tupln
, mongod is not running. I also tried restarting with sudo systemctl mongod start
but that's not working either. Any guidance would be appreciated.
The config key is not correct. It's authorization, not authentication
security:
authorization: enabled
See https://docs.mongodb.com/v3.4/reference/configuration-options/#security-options
you said sudo systemctl mongod start
and then sudo systemctl restart mongod
- look at the position of start and restart, you're using systemctl incorrectly.
you can use also use systemctl status mongod
also check upstart or syslog in /var/log/
, you should find an error there explaining why the service didn't start.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.