Install MongoDB on Ubuntu 10.04 +

Source: Internet
Author: User
Tags install mongodb

MongoDB is a distributed file storage-based database. Similar to redis, MongoDB is written in C ++ Based on nosql technology. Designed to provide scalable and high-performance data storage solutions for Web applications,

The following describes how to install and run MongoDB on Ubuntu.


1. Install the dependent package. MongoDB uses the boost library, JS engine (spider monkey or V8), and regular expression library PCRE.

apt-get -y install tcsh git-core scons g++apt-get -y install libpcre++-dev libboost-dev libreadline-dev xulrunner-1.9.2-devapt-get -y install libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev libboost-date-time-dev
2. Compile 2.1 to get the source code. You can get the main branch or compile the sub branch.
  1. git clone git://github.com/mongodb/mongo.gitcd mongo# pick a stable version unless doing true devgit tag -l# Switch to a stable branch (unless doing development) --# an even second number indicates "stable". (Although with# sharding you will want the latest if the latest is less# than 1.6.0.) For example:git checkout r2.0.0
  2. Compile
    scons all
  3. Install
-- Prefix specifies the MongoDB inventory location
  1. scons --prefix=/opt/mongo install

4. Run

# Sudo mkdir-P/data/DB

# Sudo./mongod

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.