我使用these instructions在我的ubuntu16.04机器上安装了mongodb,但有一点不同:我用sudo systemctl mongod start运行mongodb进程,从我所读到的来看,它在ubuntu16.04上运行得更好。我摆弄了一下,创建了一个用户,添加了
security: authentication: 'enabled'
编辑:
security: authorization: 'enabled'
/edit
(使用2个空格、4个空格和一个制表符迭代)到/etc/mongod.conf,然后使用以下命令重新启动
sudo systemctl mongod restart
但是现在和netstat -tupln确认一下,mongod没有运行。我也尝试用sudo systemctl mongod start重新启动,但也不起作用。任何指导都将不胜感激。
https://stackoverflow.com/questions/47521898
复制相似问题