Linux Platform Installation MongoDB

Source: Internet
Author: User
Tags mongodb download
Linux Platform installation MongoDB download

MongoDB offers 32-bit and 64-bit installation packages on the Linux platform, which you can download on the website.

: Http://www.mongodb.org/downloads


Installation

After the download is complete, unzip the ZIP package in the directory you installed.

Create a database directory

MongoDB data is stored in the DB directory in the database directory, but this directory is not created automatically during the installation process, so you need to create the data directory manually and create the DB directory in the data directory.

Note: Please create the data directory under the root directory (/).


Run MongoDB service on the command line

You can then execute the mongod command to start the MONGDB service by executing the bin directory in the MONGO installation directory on the command line.


MongoDB Background Management Shell

If you need to get into MongoDB background management, you need to first open the bin directory under the MongoDB directory and then execute the MONGO command file.

The MongoDB Shell is an interactive JavaScript shell that comes with MongoDB and is used to manipulate and manage MongoDB.

When you enter MongoDB background, it is linked to the test document (database) by default:

Since it is a JavaScript shell, you can run some simple arithmetic operations:

Now let's insert some simple data and retrieve the inserted data:

The first command is to insert data 8 into the Z field of the W3r Collection (table).


MongoDb Web user interface

On ports more than 1000 of the ports of MongoDB services, you can access the Web user interface to Mondodb.

For example: If your MongoDB run port uses the default of 27017, you can access the Web user interface in port number 28017.

Linux Platform Installation 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.