我按照这个链接[1]在centos 07下安装mongo db,数据库正常启动但后来我不知道发生了什么,它不想重新开始给我这个错误:
[root@localhost ~]# systemctl start mongod
Job for mongod.service failed. See 'systemctl status mongod.service' and 'journalctl -xn' for details.
[root@localhost ~]# systemctl status mongod.service -l
mongod.service - SYSV: Mongo is a scalable, document-oriented database.
Loaded: loaded (/etc/rc.d/init.d/mongod)
Active: failed (Result: exit-code) since mer. 2015-08-05 17:13:12 CEST; 24s ago
Process: 2872 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=1/FAILURE)
août 05 17:13:12 localhost systemd[1]: Starting SYSV: Mongo is a scalable, document-oriented database....
août 05 17:13:12 localhost runuser[2878]: pam_unix(runuser:session): session opened for user mongod by (uid=0)
août 05 17:13:12 localhost mongod[2872]: Starting mongod: [ÉCHOUÉ]
août 05 17:13:12 localhost systemd[1]: mongod.service: control process exited, code=exited status=1
août 05 17:13:12 localhost systemd[1]: Failed to start SYSV: Mongo is a scalable, document-oriented database..
août 05 17:13:12 localhost systemd[1]: Unit mongod.service entered failed state.
我将SELinux配置为"强制执行"我使用
启用了对端口27017的访问semanage port -a -t mongod_port_t -p tcp 27017
我可以使用以下命令启动数据库:
[root@localhost ~]# sudo -u root /usr/bin/mongod --quiet --config /etc/mongod.conf
about to fork child process, waiting until server is ready for connections.
forked process: 3058
child process started successfully, parent exiting
但仍然无法将其作为服务启动:( 我错过了什么想法?
提前感谢您的帮助!
[1] http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat/