Find it more and more lazy recently ... One months an article--!
Environment: Windows 7, IIS7, php5.3.5, MongoDB 2.6
The overall steps are:
Install
MongoDB, install the MongoDB extension of PHP, and install MongoDB as a service.
1. Download installation package
wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.8.2.tgzUnzip the compressed package after the download is completeTar zxf mongodb-linux-i686-1.8.2.tgz
2. Installation Preparation
Move MongoDB to
MongoDb Replica set solves the problem of fault tolerance and single point of failure, but the storage and withstanding capacity of a single machine is limited, and sharding is generated for mass storage and dynamic expansion. This has the replica
MongoDB installation is very simple, set up the installation path, always next until the end of the installation, the largest pit is the installation of MongoDB service, the following specific after the MongoDB installation of some configuration
First, installation and operation1. Download:Official: Https://www.mongodb.com/download-center?jmp=docs&_ga=1.61677796.930985429.1478502988#community2. InstallationDownload the 32-bit or 64-bit. msi file based on your system, double-click the file
MongoDB access control can effectively ensure the security of the database, access control refers to the binding application listening IP address, set the listening port, using the account and password loginOne, the parameters of the access control1,
First, let's talk about the use of $elemMatch:{ _id: 1, results: [[+ ]] { _id: 2, results: [[], +/- ] }
$elemMatch is that at least one element in the array matching document satisfies all the conditions in
Original works, allow reprint, please be sure to use hyperlinks in the form of the original source of the article, author information and this statement. Otherwise, the legal liability will be investigated. http://suifu.blog.51cto.com/9167728/1853478
Demand: Do not know if you have encountered such a demand: their own server for the protection of database security, the need to encrypt the stored data protection. In case the database is taken, no one else can get the contents of the database.
1.node.js Environment InstallationNPM Config Set Registry https://registry.npm.taobao.orgNPM Config Get registryNPM root-g2.mongodb-3.2.9 Test (user name password configured)var Server = require (' MongoDB '). Server;var Db = require (' MongoDB ').
[[email protected] bin]$ pwd/usr/local/mongodb/bin[[email protected] bin]$ ls-ltotal 207696-rwxr-xr-x 1 Bsondump #一个debug工具而不是一个备份工具, the Bson format can be converted into a JSON format that can be recognized. -rwxr-xr-x 1 MONGO
NoSQL: Non-relational, distributed, acid-not-availableSimple Data ModelSeparation of metadata and application dataWeak consistencyAdvantage:Avoid unnecessary complexityHigh throughputHigh level of scalability and low-end hardware clusteringDo not
Environment Description:centos5.6 32bitPHP 5.2.17PHP Installation Path/usr/local/phpPhpize Path/usr/binPhp-config Path/usr/binPHP.ini Path/etc/1. First download the PHP mongodb extensionDownload the MongoDB extension source package from the
Installing MongoDB on the CentOS71 connect to CentOS7 server via SECURECRT;2 Go to the/usr/local/directory:Cd/usr/local3 Create the Tools directory under the current directory:Mkdir-p Tools4 enter into the Tools directory:CD Tools5 Download the
MongoDB now has two storage engines MMAPv1 and Wiretiger, of course, in addition to these two storage engines there are other storage engines.Such as:
Memory Engine: Now the MongoDB version already has, the main cache service, it is mainly
I. Software environment (version not required) PHP v5.6 extension: MongoDB nginx v1.11 MongoDB v3.2Note: MongoDB extensions must be installedIi. Connection $client = new Mongoclient ($server, $option);$server variable is a string that describes the
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
View all data tables> Use ChatRoomSwitched to db ChatRoom> Show collectionsAccountChatSystem. indexesSystem. users Create a data table> Db. createCollection ("Account "){"OK": 1} > Db. createCollection ("Test", {capped: true, size: 10000}) {"OK": 1}{
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