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
Chapter One: Understanding Nodejs Framework express--Routing, middleware
- Routing
Routing is how to define an application's endpoint (URIs) and how to respond to a client's request.
A route consists of a URI, an HTTP request (get, post, and so
Although previously contacted the content of MySQL, but do the website, feel NoSQL database or go around.Many books have mentioned the use of Node.js and MongoDB, here to record the learning process.
Basic commands for MongoDB:
Use dbname new or
The discovery process of the problem is this, some hardware equipment uploaded real-time device information client can not show, so the query log, found that the data time delay is very serious, background logic to this data as outdated data thrown
one, linked database
$conn = new Mongo ("Mongodb://ip:port/dbname:dbpwd");
This is the default connection to the local 27017 port, of course, you can also connect remote host such as $db = $conn->selectdb ("dbname"); $collection =
Download MongoDB
wget http://downloads.mongodb.org/linux/mongodb-linux-i686-2.4.9.tgz
If the above address is not possible to go to the official website download Http://www.mongodb.org/downloads decompression MongoDB
Tar zxvfmongodb-linux-i686-2.4
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
The first is the installation. First to download the address: http://www.mongodb.org/Download the latest version, the current I downloaded is: mongodb-win32-x86_64-2.4.2.zip
I am currently decompressing to the directory E:\tools\mongodb-win32-x86_64
1. Open "Run" (win+r), enter "Services.exe" to confirm the existence of MongoDB service
2. Run cmd, use SC command to manage Windows service (if you cannot delete successfully, run cmd as an administrator)
3. If the MongoDB service is
Use command
MongoDB use database_name
Used to create a database. This command will create a new database, and if it does not exist, it will return the existing database.
Dropdatabase () method
MongoDB Db.dropdatabase ()
The command is used to
Download the installation packagewget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.6.tgzExtractTAR-ZXVF mongodb-linux-x86_64-3.0.6.tgzPut the unpacked installation package into the specified directoryMV
About the MongoDB database Summary 1. Installing the Mongodb2.mongo Database concept 3.mongo database directive MONGO database may not be practical for actual project development, but as a front-end test, enough. Close the database for the MONGO
Recently the company to do a project to use MongoDB, below to introduce the Mongorepository interface.You can analogy Hibernate's jpa,mongorepository is a basic interface that a springdata provides for operations such as add-and-revise checks and
How the MongoDB copy set is elected principle of MONGODB replicationMongoDB replication is based on the operation Log Oplog, which is equivalent to the binary log in MySQL, recording only records that have changed. Replication is the process of
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,
Using Spring data MongoDB v1.8Demand 1,The data structure is as follows. Description: Change the collection record is the company each system's access situation (LocalPath represents the system, RequestTime represents the request time, the string
About MongoDB
is a cross-platform, document-oriented database. The real performance, high availability, and ease of scalability can be achieved. is an open source database system based on distributed file storage, which adds more nodes
Centos7 the basic operation of MongoDB 3.6.6 MongoDB IntroductionMongoDB is a database based on distributed file storage. Written by the C + + language. Designed to provide scalable, high-performance data storage solutions for Web
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.