Currently in full swing MongoDB, its use threshold is so low (in this article, for example, Windows):
1, the website download installs the package
2, after installing MSI file, will see the working directory of MongoDB under C:\Program files\mongodb (actually it is green)
3, I used to organize it into their working directory, the C:\Program files\mongodb\server\3.0 copied to the E:\mongo3 (MongoDB's working directory is the main bin)
4, in order to facilitate the operation, the bin can be added to the system variable path
5. Open CMD (admin mode)
6. Register MongoDB as a Windows service and execute it in cmd:
Mongod--install--servicename "Mongo3"--servicedisplayname "Mongo3"--servicedescription "[email protected]"--dbpath "E:\mongo3\db"--port 10000--logpath "E:\mongo3\log\log.txt"
Explain:
(1) DB directory for storing database files, Log.txt for storing running logs (all manually created)
(2) The service name is "Mongo3" (then also used to remove from the service), the service list display name is "Mongo3", the service description is "[Email protected]" The three items are arbitrary
(3) The service port number is 10000 (random, less than 65535 can, of course, do not conflict with the existing port number, more than the probability of conflict is small)
(4) OK after the Windows service can see the MONGO3, it is automatic mode, but this does not start, you can manually
This way, your Windows is already a MongoDB server.
7, the command to delete the service is: Mongod--remove--servicename Mongo3
8, with the Client connection service (this machine for example):
MONGO--port 10000--host 127.0.0.1
You can then execute the operation instructions (available in the documentation or online collection)
In fact, the local MongoDB working directory can be copied to other machines, with the above steps to create a MongoDB server, similar to MySQL. I like this kind of simplicity and not simple products.
Of course, this is only the threshold, MongoDB also has a lot of advanced features need to learn curve, but as a stand-alone database to build a small application system, this is enough.
Using the threshold so low MongoDB