Install MongoDB under Ubuntu

Source: Internet
Author: User
Tags install mongodb

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


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.