systemctl start mongodb.service
systemctl stop mongodb.service
systemctl enable mongodb.service
LINUX环境下,可以通过查看端口27017的状态查看mongod是否已经启动。
netstat -lanp | grep "27017"
参考:
https://blog.csdn.net/qq_35562291/article/details/98204964
原文:https://www.cnblogs.com/lroy/p/12728987.html