linuxidc@linuxidc.com ~ $ systemctl status mongodb
● mongodb.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
linuxidc@linuxidc.com ~ $ sudo systemctl status mongod
● mongod.service - High-performance, schema-free document-oriented database
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: active (running) since Thu 2018-01-18 11:43:16 CST; 2h 13min ago
Docs: https://docs.mongodb.org/manual
Main PID: 13494 (mongod)
CGroup: /system.slice/mongod.service
└─13494 /usr/bin/mongod --quiet --config /etc/mongod.conf
Jan 18 11:43:16 linuxidc.com systemd[1]: Started High-performance, schema-free document-oriented database.
Jan 18 13:56:35 linuxidc.com systemd[1]: Started High-performance, schema-free document-oriented database.
linuxidc@linuxidc.com ~ $ sudo systemctl enable mongod
Created symlink from /etc/systemd/system/multi-user.target.wants/mongod.service to /lib/systemd/system/mongod.service.
linuxidc@linuxidc.com ~ $
更多MongoDB相关教程见以下内容:
Linux CentOS 6.5 yum安装MongoDB