Today we have to install the MongoDB bar, this is a database, in order to lazy, this article on the use of Yum installation, after all, yum convenient, rely on the package will be installed, unless it is a separate entire DB server to compile the
Description
Operating system: CentOS 5.X 64-bit
IP Address: 192.168.21.130
To achieve the purpose:
Install Configuration MongoDB Database
Specific actions:
First, close the SELinux,
In the beginning to learn MongoDB, use the command will often online search, in order to facilitate their own a document, at any time to view, so much more convenient! Hey! With Chinese translation.
MongoDB Start Command mongod parameter
Create a directory as follows
Extract the MongoDB compressed package into the MongoDB directory
Mongodata Create the Data directory to store the information; Create the log directory to store the directory
CMD input command:
MongoDB is a database based on distributed file storage. Written by the C + + language. Designed to provide scalable, high-performance data storage solutions for WEB applications.
MongoDB is a product between relational database and non relational
Java operation of the MySQL database code we already know, delete and change, Java to MongoDB database is similar operation, first database connection, and then operation.
First we enter into the admin database, and then set up their own database
Previously said to the database connection operation, please refer to: MongoDB Add user and permissions set detailedOperations on the database: Please refer to: MongoDB database operation-Create, switch, deleteLet's say that the insert operation of
For example, limit the memory size of the MongoDB.
mkdir/cgroup/memory/test/
echo 50M >/cgroup/memory/test/memory.limit_in_bytes
echo 50M >/cgroup/ Memory/test/memory.memsw.limit_in_bytes
cgexec-g memory:test mongod-port 27017--bind_ip 127
MongoDB does not require a password after the default installation. At this point you show DBS will see that there is only one local database, the so-called admin does not exist. MongoDB has no root, only the user who can manage the user
To complete the requirements in this introduction, we start with the objectid of MONGO, we know that the first four bytes of Objectid are timestamps, then we can filter the records in Mongodump-q. If you do not understand the structure of the MONGO
One, write performance test script[Email protected] bin]#/mongo 172.27.8.118:40000sharding_2:primary> Use adminSwitched to DB adminSharding_2:primary> Db.auth (' WLAN ', ' WLAN ')Sharding_2:primary> Use EstestdbnewSwitched to DB estestdbnew for (Var
One of the biggest differences between SQL and NoSQL is that join is not supported, and in a traditional database, theSQL JOIN clause allows you to use a normal field, in two or more tables, for each row of data in a combined table. For example, if
As a database software, we want to ensure that the data security, not everyone can access, so MongoDB also like other database software can be used as a user authentication method, mongodb 3.0 previous versions Span lang= "ZH-CN" > provides adduser
Install MongoDB under Mac1. Download mongodb-osx-x86_64-3.4.1.tgz and unzip the Https://www.mongodb.com/download-center on the MongoDB website.2.Enter the extracted bin directoryfengnovodemacbook-pro:~ fengnovo$
1. First to the official website (http://www.mongodb.org/downloads) Download the appropriate installation package, the current version is 2.6Installation package has zip and MSI format, it is recommended to download the ZIP format, the MSI is
"Note: MongoDB automatically sets the _id field as the primary key"--------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------
MongodbConceptual AnalysisNo matter what database we learn, we should learn the basic concepts, the basic concept in MongoDB is a document, a collection, a database, we introduce each one.The following table will help you understand some of the
Synchronization processSelect the node from which to pull the oplog1. Applies the op executes this op log2. Writes the op to its own oplog (also local. oplog. rs) write this op log to your oplog3. Requests the next op request to which the next op
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.