MongoDB Installation and Configuration

Source: Internet
Author: User

Mongo DB is a non-relational database (NOSQL) that is currently very popular in the IT industry, and its flexible data storage methods are favored by current it practitioners. Mongo DB is a good implementation of object-oriented thinking (Oo idea), in Mongo db each record is a document object. The biggest advantage of Mongo DB is that all data persistence requires no developers to write SQL statements manually, and it is easy to invoke methods to implement CRUD operations.

First, download

Note: official:http://www.mongodb.org/downloads

According to their actual situation to choose the appropriate version to download, my virtual machine is a 64-bit CentOS6.5 so I downloaded a mongodb for Linux 64bit version;

# CD/USR/LOCAL/SRC

# wget Https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.5.tgz


Second, installation configuration

OK, download good, I prepared the environment and installation configuration;

# tar XZVF mongodb-linux-x86_64-2.6.5.tgz//unzip the downloaded package;

# mkdir-p/apps

# mkdir-p/data/db

# MV Mongodb-linux-x86_64-2.6.5/apps/mongo

# mkdir-p/apps/mongo/logs

# Touch/apps/mongo/logs/mongodb.log

# So the installation is done! Are you sure? Yes, it's so simple!


Third, start MongoDB

Note: There are three ways to start MongoDB: command line, configuration file, daemon, and so on. Generally we choose the last one, as follows:

#/apps/mongo/bin/mongod--dbpath=/data/db--logpath=/apps/mongo/logs/mongodb.log--fork


Note: The default port of MongoDB is 27017,web port is on its basis +1000;mongod has a lot of parameters, you can make the corresponding changes according to your own needs, to see the relevant parameters of the method plus--help parameters can be;


Four, calibration and testing

# NETSTAT-TUNLP | grep 27017

TCP 0 0 0.0.0.0:27017 0.0.0.0:* LISTEN 1495/mongod


#/apps/mongo/bin/mongo

MongoDB Shell version:2.6.5

Connecting To:test

>


OK, here, the installation and configuration of your success, start to play with your MongoDB!


This article is from the "Square Hill" blog, please be sure to keep this source http://63638790.blog.51cto.com/513514/1574934

MongoDB Installation and Configuration

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.