MongoDB is an open-source database, here do not need me to say, below the Ubuntu installation of MongoDB may encounter problems and solutions.
Story background:
today m$ Promotion, 1¥windows Azure 4000¥-30 Day's package, have to say is simply cabbage price! So bought a play, the Cloud ran an Ubuntu virtual machine, later found to install MongoDB when some strenuous, Sudu apt-get install mongodb-gen10 always prompt to find the download list, Then finally found the solution, as follows:
1. Run command: sudo apt-key adv--keyserver keyserver.ubuntu.com--recv 7F0CEB10
2, run the command: vi/etc/apt/sources.list.d/10gen.list (note that this command may require Sudu permissions, if necessary, add sudo in front of VI, note the space between Sudu and VI)
3. Insert the following command to 10gen.list:
Deb Http://downloads-distro.mongodb.org/repo/ubuntu-upstart Dist 10gen
4. Save and Exit VI
5. Run command: sudo apt-get update
6. Run command: sudo apt-get install Mongodb-10gen
7, wait for the installation, after that will be OK!
Additional actions:
8, run the command vi/etc/mongodb.conf ( Note that this command may require Sudu permissions )
9. You can set DBPath and logpath (data file path and log file path respectively) according to your preference.
10. Save and exit
11, sudo service MongoDB Start/stop/restart respectively corresponding to start/stop/restart MongoDB