温馨提示×

centos7如何关闭mongodb服务

小晨
772
2021-07-27 14:28:10
栏目: 云计算

centos7中关闭mongodb服务的方法:1、打开centos7终端;2、输入“systemctl start mongod.service”命令关闭mongodb服务即可。

centos7如何关闭mongodb服务

具体操作步骤:

1、在centos7系统桌面中使用快捷键【Ctrl+Alt+T】打开centos7终端命令行模式。

2、在centos7终端命令行中输入以下命令关闭mongodb服务即可。

systemctl stop mongod.service

相关命令:

systemctl start mongod.service #开启MongoDB

chkconfig mongod on #加入开机启动

systemctl restart mongod.service #重启MongoDB

ps -aux | grep mongod #查看数据库的进程是否存在

mongo #启动mongoshell

0