Juste installé une version propre de mongodb sur Fedora 17 64 bits, mais le service Mongo ne fonctionnera pas.
J’ai suivi ces instructions lors de l’installation
Fonctionnement
service mongod start
résulte en
Starting mongod (via systemctl): Job failed. See system journal and 'systemctl status' for details. [FAILED]
Donc j’ai couru
systemctl status mongod.service
ce qui me donne
mongod.service - SYSV: Mongo is a scalable, document-oriented database. Loaded: loaded (/etc/rc.d/init.d/mongod) Active: failed (Result: exit-code) since Mon, 18 Jun 2012 13:15:56 +0200; 58s ago Process: 13584 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=1/FAILURE) CGroup: name=systemd:/system/mongod.service
Mongo se connecte dans /var/log/mongo/mongod.log
est vide
Merci
Comment installer mongodb et mongodb-server sur fedora linux (vérifié sur f16 et f17). Toutes les commandes sont destinées à être exécutées dans une session su.
1) assurez-vous de ne pas avoir d’installation mongodb
# yum erase mongodb # yum erase mongo-10gen (if it is installed)
2) installer à partir de fedora yum repository
# yum --disablerepo=* --enablerepo=fedora,updates install mongodb mongodb-server
3) démarrer mongod (démon mongodb)
# systemctl start mongod.service
4) vérifier que mongod fonctionne
# systemctl status mongod.service # tail /var/log/mongodb/mongodb.log # nmap -p27017 localhost
ou client en cours d’exécution
# mongo MongoDB shell version: 2.0.2 connecting to: test > db.test.save( { a: 1 } ) > db.test.find() { "_id" : ObjectId("4fdf28f09d16204d66082fa3"), "a" : 1 }
5) personnaliser la configuration
# vim /etc/mongodb.conf # systemctl restart mongod.service
6) faire démarrer automatiquement le service mongodb au démarrage
# systemctl enable mongod.service
Mise à jour pour Fedora 18
Lorsqu’il est démarré pour la première fois par systemd sur une machine lente ou chargée, le service mongod peut expirer avant la fin de son initialisation, avec systemd signalant que le service a échoué.
Symptômes:
# journalctl -xn -- Unit mongod.service has begun starting up. 10:38:43 local mongod[24558]: forked process: 24560 10:38:43 local mongod[24558]: all output going to: /var/log/mongodb/mongodb.log 10:40:13 local systemd[1]: mongod.service operation timed out. Terminating. 10:40:13 local systemd[1]: Failed to start High-performance, schema-free document-oriented database. -- Subject: Unit mongod.service has failed
Cure très facile, redémarrez le service:
# systemctl restart mongod.service
ceci devrait terminer l’initialisation avec succès et laisser le démon en cours d’exécution.