mandag 1. februar 2016

Installing MongoDB 3.2.x (or current MongoDB) on Ubuntu 15.04/15.10

Installing MongoDB on a Unbuntu 15.04/15.10 server should in theory be trivial enough. Unfortunately this turned out to not be the case...

MongoDB has created a "howto" (available here) for Ubuntu, but it won't work as it fails to set up a systemctl service unit. From the command below it is not possible to list the mongod.service unit. It is simply missing, thus it cannot be started...


inforte@mean01:/etc$ sudo systemctl list-units --type=service
UNIT                               LOAD   ACTIVE SUB     DESCRIPTION
lvm2-pvscan@8:17.service           loaded active exited  LVM2 PV scan on device 8:17
mongod.service                     loaded active running LSB: An object/document-oriented database
networking.service                 loaded active exited  LSB: Raise network interfaces.

The official statement from the folks at MongoDB is that they support Ubuntu LTS releases, which would leave me with MongoDB version 2.6.something.
Or I could wait for the next LTS, but sometimes 3 months just seem to be a very looong time...

After searching the net for a solution to this I came across this posting on Stack Overflow:

http://stackoverflow.com/questions/29879231/upgrade-to-ubuntu-15-04-from-14-10-breaks-mongo-how-to-fix

To bad the wrong answer is listed, cause the fix is really simple. Just follow the link on LukePolo's answer.





The trick is simply to install using the debian instruction.





Ingen kommentarer:

Legg inn en kommentar