我需要能够在cli上启动/停止MongoDB.这很简单:
./mongod
但是要停止mongo DB,我需要首先运行open mongo shell然后键入两个命令:
$ ./mongo 使用管理员 db.shutdownServer()
$ ./mongo
使用管理员
db.shutdownServer()
所以我不知道如何在一行中停止mongo DB.有帮助吗?
mongodb
mongodb ×1