I installed from the debian wheeze repository and it works fine.
First make sure you remove the mongodb-org package and all its dependencies:
sudo apt-get purge mongodb-org
sudo apt-get autoremove
Remove the old mongodb.list you created:
sudo rm /etc/apt/sources.list.d/mongodb.list
Use the Debian repository instead:
echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
Update and install again:
sudo apt-get update
sudo apt-get install -y mongodb-org
After that, you can succesffully start the server:
sudo service mongod start
or
systemctl start mongod
(as clarified by Ernie Hershey in reply to Roman Gaufman's comment here: https://jira.mongodb.org/browse/SERVER-17742)
It's possible, that MongoDB doesn't start if you use the Trusty packages:
Failed to start mongod.service: Unit mongod.service failed to load: No such file or directory.
In this case, install the Debian Wheezy packages as described at the end.
Install the Trusty DEB packages
Download the DEB files
cd
wget http://repo.mongodb.org/apt/ubuntu/dists/trusty/mongodb-org/3.0/multiverse/binary-amd64/mongodb-org-mongos_3.0.3_amd64.deb
wget http://repo.mongodb.org/apt/ubuntu/dists/trusty/mongodb-org/3.0/multiverse/binary-amd64/mongodb-org-server_3.0.3_amd64.deb
wget http://repo.mongodb.org/apt/ubuntu/dists/trusty/mongodb-org/3.0/multiverse/binary-amd64/mongodb-org-shell_3.0.3_amd64.deb
wget http://repo.mongodb.org/apt/ubuntu/dists/trusty/mongodb-org/3.0/multiverse/binary-amd64/mongodb-org-tools_3.0.3_amd64.deb
wget http://repo.mongodb.org/apt/ubuntu/dists/trusty/mongodb-org/3.0/multiverse/binary-amd64/mongodb-org_3.0.3_amd64.deb
And install with (in this order)
sudo dpkg -i mongodb-org-server_3.0.3_amd64.deb
sudo dpkg -i mongodb-org-tools_3.0.3_amd64.deb
sudo dpkg -i mongodb-org-shell_3.0.3_amd64.deb
sudo dpkg -i mongodb-org-mongos_3.0.3_amd64.deb
sudo dpkg -i mongodb-org_3.0.3_amd64.deb
And taken from the comments, thank you @Pilot6:
They may have dependencies to each other. That's why installation
packages one by one may give errors. I suggest sudo dpkg -i mongodb*.deb
Use the Trusty PPA
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
Use the Debian Wheezy packages
It's possible, that MongoDB doesn't start if you use the Trusty packages:
Failed to start mongod.service: Unit mongod.service failed to load: No such file or directory.
In this case, install the Debian Wheezy packages as described below
sudo apt-get remove mongodb-org
sudo apt-get autoremove
sudo rm /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
Best Answer
In default installations, the configuration file is at
/etc/mongod.conf
. What the MongoDB docs don't mention is that when migrating to WiredTiger we also need to update the configuration file to the new YAML format introduced in 2.6.As far as I can tell the
engine
option is only available in the new configuration format.Migrating from the old storage engine consists in creating a database dump, shutting down mongodb, changing settings and then importing the dump into the new storage engine.
Create a backup. Seriously. We need a database dump which we'll then import to the new database engine:
Stop the mongodb service
Move data from the current location to somewhere else (MongoDB will not startup if the data directory contains files generated by the old storage engine).
Upgrade MongoDB to version 3.0 (from http://docs.mongodb.org/v3.0/tutorial/install-mongodb-on-ubuntu/):
Convert the configuration file from old (pre 2.6) to the current YAML format. The bare minimum is:
Make sure no lines in the old format remain, or MongoDB won't start.
The full documentation for the configurtion file is at: http://docs.mongodb.org/v3.0/reference/configuration-options/
Optionally make a backup of the log:
Restart mongodb
Load the backup to convert data to new storage engine
After checking that all your data is ok, you can delete the directory with the old data format
Note that for replica sets and sharded clusters there are some aditional steps: http://docs.mongodb.org/v3.0/release-notes/3.0-upgrade/?_ga=1.86531032.1131483509.1428671022#change-replica-set-storage-engine-to-wiredtiger