Install Mongodb in Ubuntu, and install Mongodb in Ubuntu

Source: Internet
Author: User
Tags install mongodb

Install Mongodb in Ubuntu, and install Mongodb in Ubuntu

Mongodb is an open-source database. I don't need to talk about it here. Let's talk about the problems and solutions that may occur when installing Mongodb In Ubuntu.

Background:

Today's M $ sales promotion, 1 $ Windows Azure 4000 $-30 days package, I have to say it is simply a cabbage price! So I bought a play, the cloud ran a Ubuntu virtual machine, and later found that the installation of Mongodb when some effort, sudu apt-get install mongodb-gen10 is always prompted to not find the download list, finally, the solution was found as follows:

1. Run the following 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 permission. If you need sudo before 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 the command: sudo apt-get update

6. Run the command: sudo apt-get install mongodb-10gen

7. Wait for the installation, and then it will be OK!


Additional operations:

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 preferences)

10. Save and exit

11. sudo service mongodb start/stop/restart correspond to start/stop/restart Mongodb respectively.



How does Ubuntu completely uninstall MongoDB?

Sudo apt-get autoremove
Sudo apt-get autorclean

Dpkg-l | grep ^ rc | awk '{print $2}' | tr ["\ n"] [""] | sudo xargs dpkg-P-

These three commands should be enough! @

How does Ubuntu completely uninstall MongoDB?

Sudo apt-get autoremove
Sudo apt-get autorclean

Dpkg-l | grep ^ rc | awk '{print $2}' | tr ["\ n"] [""] | sudo xargs dpkg-P-

These three commands should be enough! @

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.