Operation Steps I'm not going to refine it anymore.
Project can run, tested, first configuration, another article on the code, source address: http://pan.baidu.com/s/1pJslZ0v
Project structure
Pom.xml
4.0.0 test springmvc_mongodb war
There is only access to MongoDB IP restrictions, accurately speaking, firewall port access restrictions, with MongoDB no special relationship, to use other places can also be.
#首先, all requests to access Port 27017 will be denied.
Iptables-i
Previously designed a label system based on Lucene, in the case of a small amount of data and the amount of concurrency can be used reluctantly, more than 1 million of the query will be more than 1 seconds, ranking is affecting a lot of performance,
requirements, MySQL table, a log table, the average record of statistical data cycle, in practice to learn, with MySQL may be more trouble, then use just contact with the MongoDB bar, but also with the study of Hadoop last year stained point, and
First download the database on the official website, the official web provides two forms of the database, one is free installation version, one is installed version, this is similar to Apache Tomcat, the installation version has a visual interface
Three elements: Database collection document (extended Bson of JSON)Service start restart stop: sudo service MongoDB start (Stop,restart)Modifying a configuration file/etc/mongodb.confAdd Smallfiles=trueView current Database dbView all databases
1. Download the MongoDB installation packageMongoDB's official website: http://www.mongodb.org find the appropriate version to download.If you have a network, download it directly (CentOS version) and unzip the tarball.wget http://fastdl.mongodb.org/
Tag: Create database close. exe path width http color BPAAfter installation, enter CMD. Go to the Bin directory under the installation directory.Choose an empty directory and create a Db,log folder. After the terminal command line, enter a return.D:\
Enter Mongodb:mongoExit Mongodb:exitShow All libraries: Show DBSSwitch database: Use database nameView your library: DBDelete Library: Db.dropdatabase ()View a collection of current databases: Show collectionsCollection creation: db.createcollection
A moment to downloadOfficial website: Https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.6.3-signed.msiThe official website may not open, will this URL directly to the Thunder download.Two environment configurationFILE-level
MongoDB boot command (in a CMD window) example: Mongod-dbpath "E:\db" MONGO use Database ( in another new CMD window) to list all databases: Show DBS using a database name View current database DB mongoimport import data mongoimport--db
Environment settings:[Email protected] ~]# cat/etc/redhat-release CentOS release 6.9 (Final) [[email protected] ~]# Python-vpython 2.6.61. First make sure that the MongoDB database is running2. Installing the Pymongo moduleOfficial website:
3.4 of: Http://downloads.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-v3.4-latest-signed.msi?_ga= 2.7045623.410933966.1512521590-461885398.1512521590Download page for official website: Https://www.mongodb.com/download-center?jmp=navDownloaded
MongoDB cluster data query slow, db.collection.find () do not set the condition of the query is almost impossible to find out, by checking the status of each shard server in the cluster, found a machine status of Recoving. View the
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 a relational database and a
MongoDB is written by the C + + language and is an open source database system based on distributed file storage.In the case of high load, adding more nodes can guarantee the performance of the server.MongoDB is designed to provide scalable,
1. Basic query ① Method Find (): Query db. collection name. Find ({conditional document}) ② method FindOne (): Query, returns only the first DB. Collection name. FindOne ({conditional document}) ③ method Pretty () : Formats the result of the DB.
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