Java from entry to entry-database Mongo DB installation start and configuration details, from entry to entry-level mongo
I. Overview
After Mongo DB is downloaded, how should we install and start and configure Mongo DB? This blog will introduce how to install and start Mongo DB and how to configure it.
Ii. Installation
1. Download Mongo DB
Http://www.mongodb.org/downloads
Click the above link to download Mongo DB
2. Decompress Mongo DB
3. Configure Environment Variables
4. Check whether Mongo DB is successfully installed.
Cmd mongo-version
Iii. startup and configuration details
Three files are required to start Mongo DB.
MongodbService. bat Server
MongodbClient. bat Client
Mongodb. conf configuration
The following describes how to configure each file.
MongodbService. bat
Mongod.exe -- config mongodb. conf
-- Config: # specify the file path for the startup Item
MongodbClient. bat
// Your server address and port number
Mongo 127.0.0.1: 27017/admin
Mongodb. conf
DbPath = D: \ software \ MongoDBDATA # Database address #
Port = 27017 # specify the port number of the server listener. The default value is 27017.
Fork = true # Start mongoDB using daemon
Logpath = D: \ MongoDBLog # Log Path
Auth = true | false # use Security Authentication
Bind_ip = 127.0.0.1 # IP address of the current server
Slave = true | false # determine whether you are a slave server
Master = true | false # confirm that I am the master server
ReplSet = child/127.0.0.1: 2222 # Set companion
Finally, you can open the server and then open the client. You can use MongoDB, as shown in figure
Iv. Summary.
This blog only describes a simple method of installing and starting MongoDB, and a method of installing services.