First of all, my system is a ubuntu11.04,64 bit system, the following installation may need to modify their own system conditions.
1. Download MongoDB installation package
$wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.0.tgz
2.
Description:
There are two installed MongoDB database server, now need to set a main library, another set to from the library, to achieve master-slave synchronization.
Operating System: CentOS 7.0 64-bit
MongoDB database version:mongodb-linux-x86_64-
The use of aggregate helps us to further split the set in MongoDB.
Example:
Db.collection.aggregate (
{$match: {x:1}, {
limit:10},
{$group: {_id: "$age"}}
);
Operator Introduction:
$project: Include, exclude, rename, and display
configuration of the cluster(This test is placed on the same machine for configuration, so the IP address, if it is on a different server to replace the IP can be)
1, directory structure copy two MongoDB to/home/scotte.ye/mongo1
Document at address: http://download.csdn.net/detail/wyqlxy/3999890
MongoDB is a document-type database, not a relational database. The basic idea is to replace the original "line" concept with a more flexible "document" model. A document-oriented
With spring and MONGOLDB integration, the versions of the spring and MongoDB-related jars are right, otherwise there will be problems in development; I manage these jar files with Maven, and using MAVEN, it's easy to manage these resource files
MongoDB is a document-type NoSQL database, the official website downloads the address https://www.mongodb.com/download
Linux version of the 64-bit my virtual machine is 32-bit, I am under the Windows version, but the operation is similar.
The
The use of MongoDB was initiated from version 2.4, but the rights management was relatively straightforward. And I didn't get it.
Now look back at several versions of Rights management and see the changes between versions.
and the cluster and the
(The following methods can only recover part of the data because the Oplog table does not have all of the synchronization logs saved, size limited)
Because the Oplog table (called a table after collection for custom) has no index, I have to select
One, the basic command:
1. View all databases: Show DBS
2, select database Use DbName, if the database does not exist, the database will be created
3. View all database related operations (similar to JavaScript functions) Db.help ()
Use Db.help ()
resolves a MongoDB cursor ID is not a valid at server issue
When you use Db.collection.find (), it returns not all data, but actually a "cursor". Its default behavior is to query the database for the first 101 documents, or 1 MB of documents,
Here is a reference to the article: https://www.cnblogs.com/dennisit/p/3372568.html https://www.cnblogs.com/TinyBobo/p/7867208.html/http limingnihao.iteye.com/blog/1940446
We recommend that you look at the second connection
First introduce the JAR
The condition operators in MongoDB are:
· (>) Greater than-$GT
· (
· (>=) greater than or equal to-$gte
· (
We used the database name "Runoob", our collection name is "Col", the following is the data we inserted.
To facilitate testing, we can use
Grammar
The syntax format for MongoDB database creation is as follows:
Use database_name
If the database does not exist, create the database, or switch to the specified database.
Example
The following example we created the database Runoob:
>
A recent job is to use Nginx + LUA to implement an API to manipulate the MongoDB database, mainly implementing its count and query functions. Did not write Lua before, so also reluctantly to get started, on the basis of the CLOUDWU Lua-mongo
First, the environment
1. Maven 3.3.9
2. Eclipse
3, Springboot 1.5.6
4, Mongo 3.4.6 second, the development
1, a new Springboot project, the introduction of 1.5.6 dependency.
2, the project structure is as follows
3. Add the following
OverviewMongoDB shards are a way to store data using multiple servers to support huge data stores and manipulate data. Shard Technology can meet the demand of a large number of MONGODB data volume, when a MongoDB server is not enough to store
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