Before the cloud Habitat community has sent a few similar articles, we can refer to.
Core code:
Class Newmongodb {private $mongo;
Newmongodb connection Private $curr _db_name;
Private $curr _table_name;
Private $error;
public $config;
This is a bit of an omission from previous articles about using MongoDB's shell to execute scripts, which is now supplemented in this blog post;One, passing in the script file on the command lineDefine a JAVASCIPRT file with the following name:
To create a data catalog:# Mkdir/data/mongoCreating a configuration file# VI/DATA/MONGO/MONGODB.CNFdbpath=/data/mongo/Logpath=/data/mongo/mongo.logLogappend=trueFork=trueport=27017Or: Do not create a configuration file by starting with the Mongod
JsonJSON is a simple way to represent data, it is easy to understand, easy to parse, easy to remember. But on the other hand, JSON has some limitations because there are only a few types of data such as NULL, Boolean, number, string, array, and
After the successful start of MongoDB, and then open a command line window input MONGO, you can do some of the database operations.Enter help to see the basic Operations Command:Show DBS: Display Database listShow Collections: Displays a collection
We should first know the data structure of MongoDB: MongoDB: Library----Collection-->json ObjectViewShow DBS//See which libraries are availableShow collections//See which collections are in the libraryLibrary operationsUse library name//using a
Use Hadoop MapReduce analyzes MongoDB data(Many internet crawlers now store the data in Mongdb, so they study it and write this document)
Copyright NOTICE: This article is Yunshuxueyuan original article.If you want to reprint please
In fact, Redis installation program is very good, directly help us to build the service, directly can use SYSTEMCTL to start it, and MongoDB in this respect is not so smart, we need to write their own service script, and then add it to boot from the
Chapter III index operations and performance testingThe importance of indexes under big data is not much to say.The following test used a MongoDB client tool Robomongo, you can choose to download on the Internet. Official website:
the data structure to query for such as the following:take the Versionlimitlist field in the query as an exampleMongooperations Tool class Query related statementscriteria criteria1 = Criteria.where ("Validstarttime"). GT (New Date ()). and ("
Correct BACKUP statement: mongodump-h 172.27.137.26:36137-d ssdb-o f:\data\ssdb170505-u=administrator-p=qqddd.222--authenticationDat Abase=admin for the first time using mongodump-h 172.27.137.26:36137-d ssdb-o
Plan your deployment as follows:650) this.width=650; "src=" Http://www.wangerbao.com/wp-content/uploads/2017/04/20170412184145_91477.png "style=" border:0px; "/>1. Prepare the basic Environmentdownload mongodb-linux-x86_64-rhel62-3.4.2.gz on the
Complete the installation of MongoDB (slightly)To create a data catalog:# Mkdir/data/mongoCreating a configuration file# VI/DATA/MONGO/MONGODB.CNFdbpath=/data/mongo/Logpath=/data/mongo/mongo.logLogappend=trueFork=trueport=27017Or: Do not create a
I. PrincipleThe principle of Zabbix monitoring MongoDB is through echo "Db.serverstatus ()" | MONGO Admin to see the status of MongoDBTwo Server Configuration1) Add global variables for MONGO# vim/etc/profile.d/mongo.shExport Path=/usr/local/mongodb/
Remember to run CMD in Administrator mode, or the service will fail to startReprint: http://blog.csdn.net/boby16/article/details/51221474Detailed illustrations documenting the process of installing the MONGO database in Win7 64. The installed
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.