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 I bought a play. The cloud ran an Ubuntu virtual machine. Later found that the installation of MongoDB is a bit laborious, Sudu apt-get install mongodb-gen10 always prompt to find the download list. The solution was eventually found, such as the following:

1. Execute command: sudo apt-key adv--keyserver keyserver.ubuntu.com--recv 7F0CEB10

2, execute the command: vi/etc/apt/sources.list.d/10gen.list (note that this command may require Sudu permissions.) Suppose you need to add sudo to the front of VI, notice 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. Execute command: sudo apt-get update

6. Execute command: sudo apt-get install Mongodb-10gen

7, wait for the installation, after that will be OK!


Additional actions:

8. Execute Command vi/etc/mongodb.conf ( Note that this command may require Sudu permission )

9, can according to their own preferences. Set DBPath and LogPath (each is a data file path and a log file path)

10. Save and exit

11, sudo service MongoDB Start/stop/restart respectively to start/stop/restart MongoDB


Install MongoDB under Ubuntu

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.