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