Install MongoDB in Ubuntu

Source: Internet
Author: User
Tags install mongodb
Install MongoDB In Ubuntu. If it is a desktop environment, switch to the root user in the console. Because the Default User in Ubuntu Desktop version does not have the highest level of permissions

Install MongoDB In Ubuntu. If it is a desktop environment, switch to the root user in the console. Because the Default User in Ubuntu Desktop version does not have the highest level of permissions

MongoDB is a scalable and high-performance open-source NoSQL document database. It is mainly developed using C ++. For document storage, full index support, replicable and high availability, automatic sharding, and other features. Among non-relational databases, DRDs is the most versatile and most similar to relational database document databases. The data structure is loose and is similar to the json bjson format.

Install MongoDB In Ubuntu. If it is a desktop environment, switch to the root user in the console. Because the Default User in Ubuntu Desktop version does not have the highest level of permissions, switch to the root user in the console.

Specific Method:

In the Ubuntu Desktop Environment, click ctrl + alt + t to open the console, enter the command: sudo passwd root, and press enter to prompt "enter a new unix Password ", enter the password to generate a new root password, and then enter it again. Then enterSuPress enter to enter the password you just set. For example:


Configuration package management system:

1. the Ubuntu package management tool ensures the consistency and reliability of the downloaded package. Run the following command on the console to import10gen public GPG Key:

  • Sudo apt-key adv -- keyserver keyserver.ubuntu.com -- recv 7F0CEB10
  • 2. Run the commandVi/etc/apt/sources. list. d/10gen. list

    Enter the following content in the insert status to obtain the 10gen target database.

  • Deb dist 10gen
  • 3. Execute the following command to obtain the latest library content

  • Sudo apt-get update
  • Install MongoDB package

  • Sudo apt-get install mongodb-10gen
  • Complete the installation!

    Configure MongoDB

    Run the command in the/etc/directory of the configuration file.Vi/etc/mongodb. conf

    For mongodb users /Var/lib/mongodb In/Var/log/mongodb

    Run MongoDB

  • Sudo service mongodb start
  • Stop MongoDB

  • Sudo service mongodb stop
  • Restart MongoDb

  • Sudo service mongodb restart
  • For more information about Ubuntu, see the Ubuntu special page? Tid = 2

    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.