MongoDB installation Configuration

Source: Internet
Author: User
Tags mongodb server

1. Download Mongondb.
2. After the installation is complete
3. Create data directory: (e.g. C: \ or D:\. such as
Create a new data directory under the directory. For storing the DB directory. C:\MongoDB\data\db

4. command to run the MongoDB server:
A. In the cmd command box, first specify the bin directory to MongoDB: CD C:\MongoDB\Server\3.2\bin (this is my directory)
B. Execute mongod.exe--dbpath c:\MongoDB\data\db command (--dbpath specify Data directory address)

5. Start the MongoDB service (execute command with Administrator privileges) to view the log file after the service is successfully started
Once you've configured your information.

Mongod.exe
--bind_ip youripadress
--logpath "C:\data\dbConf\mongodb.log"
--logappend
--dbpath "C:\data\db"
--port Yourportnumber
--servicename "Yourservicename"
--servicedisplayname "Yourservicename"
--install

Parameter description
--BIND_IP bind service IP, if bind 127.0.0.1, then only native access, do not specify default local all IP
--logpath the MongoDB log file, note that the specified file is not a directory
--logappend writing the log using the Append method
--dbpath Specifying the database path
--port specifying the service port number, default port 27017
--servicename Specifying the service name
--SERVICEDISPLAYNAME Specifies the service name, which is executed when there are multiple MongoDB services.
--install is specified as a Windows service installation.


Execute startup command: Net start MongoDB
Execution stop fame and wealth: net stop Moongodb

MongoDB installation Configuration

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.