Use of MongoDB

Source: Internet
Author: User
Tags curl

Use MongoDB as a database under Ubuntu.

Installation:

I use the 64-bit system to download at this URL:

Http://downloads.mongodb.org/linux/mongodb-linux-x86_64-1.4.4.tgz

32-bit:

Http://downloads.mongodb.org/linux/mongodb-linux-i686-1.4.4.tgz

Always see with curl download software, but I did not install good curl, can only manually download the installation, fortunately it is not very troublesome.

Tar xzf mongodb-linux-x86_64-1.4.4.tgz

The name is too long, renamed:

MV mongodb-linux-x86_64-1.4.4 MongoDB

Create a Data folder

By default, MongoDB stores data in the/data/db/folder, which needs to be created manually.
Create the following ways:
-p/data/db/-u '/data/-R mongodb:mongodb/data

Happy to run MongoDB



> Db.foo.find (

See output: {"_id": ObjectId ("5500f8dea6d9c8bb1593cb34"), "a": 1}

Finally the installation is ready.

It is also necessary to continue to explore its usage.


Use of 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.