There are 2 ways to start MongoDB, one is to specify configuration parameters directly, and the other is to specify a configuration file. The configuration file is introduced here, starting with the following:
Mongod--config/etc/mongodb.confThe
Transferred from: http://blog.yucanlin.cn/2015/03/23/mongodb-%E4%BF%AE%E6%94%B9-ulimit/ MongoDB Modify UlimitIt all comes from the warning of MongoDB.
1
** WARNING: soft rlimits too low. rlimits set to 4096 processes, 64000
Encounter problems: early morning received the alarm, a MONGODB server CPU load more than 8. Because it did not affect the business, the next morning began to check the reasons.Check the reason:1. First understand what the application on this server
The project needs to test the performance of MongoDB, see the next online many practices are tested using YCSB, so began to learn to use YCSB.Resources:
YCSB GitHub Address: Https://github.com/brianfrankcooper/YCSB
http://blog.csdn.net/czw698/article/details/8791153MongoDB provides several commands for shutting down the service, specifically the following:One use crtl+c off
[Email protected] data]$
Start Configsvr1. Ensure that the configsvr of the MONGDB is started in service mode, that is, from the script under/ETC/INIT.D, and that the user is mongod.2. Ensure that the Mongod configuration files are identical.3. Ensure that all keyfile file
1. MongoDB Installation on Mac
Download mongodb,https://www.mongodb.org/
Unzip to a specified folder, such as:/users/enniu1/desktop/zjg/mongodb-osx-x86_64-3.2.6 (This is my MongoDB version)
Configure path
Input command: "VI
First, the introduction of MongoDB Java driver packageIf the Java project that needs to manipulate MongoDB is a MAVEN project, you can add the following configuration to the dependency. org.mongodb mongo-java-driver 2.13.2
1.:http://www.macupdate.com/app/mac/33918/mongohub2. After downloading, the decompression can be used:3. After double-clicking the Mongohub icon, the Mac firewall may pop up the following prompt, first click "OK":4. Click "Security and Privacy" in
Export to JSON:$ mongoexport.exe-d testdb-c testcollection-o./test.jsonExport to CSV:If you are want to output CSV, you are specify the fields in the order you want them.$ mongoexport.exe--csv-f _id,f1,f2,f3,f4,f5,f6,f7-d testdb-c
SumSum by conditionDb.aa.aggregate ([ {$group: {_id:null, total: {$sum: ' $value '}}},//$value refers to sum by that column. For example, value is a column of MONGO. So this should be $value
Cluster constructionOnly 3 servers, start to build MongoDB cluster is the main reference is http://www.lanceyan.com/tech/arch/mongodb_shard1.html, port settings are mongos for 20000, config Server is 21000, Shard1 is 22001, Shard2 is 22002, and
command to start the database
1
mongod --dbpath C:\MongoDb\data\db -logpath C:\MongoDB\data\log\mongolog.log
Common commands for several databases
use DATABASE_NAME // 创建数据库
>db //
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
MongoDB is now getting more and more fire, to do a good job of mongodb monitoring needs to be from its installation configuration, to the simple command statement to use, and then to its operation mechanism and State acquisition method
MongoDB download under the MAC installation is relatively simple, there are two main ways, one is to download the compression package decompression, the other is through the NPM or Homebrew command installation, here will not repeat,The complex is
MongoDB provides a C # development interface, starting with the download, then inserting, querying, updating.Start the MongoDB service first.Download Http://github.com/mongodb/mongo-csharp-driver/downloads. Each version will have two drive modes,
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