Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MongoDB Series-1 Windows installation MongoDB

2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Windows install MongoDB

Introduction: install MongoDB as a service of Windows

Environment: Windows 7 64 bit

Software: mongodb-win32-x86_64-2.2.2.zip

(1) decompress mongodb-win32-x86_64-2.2.2.zip to disk D and change the directory to: d:\ mongodb-2.2.2

(2) build a database to store folders and log files: d:\ ProgramData\ MongoDB\ data and D:\ ProgramData\ MongoDB\ logs\ mongo.log

(3) create a configuration file: d:\ mongodb-2.2.2\ mongod.cfg

The content is:

Logpath=D:\ ProgramData\ MongoDB\ logs\ mongo.log

Logappend=true

Dbpath=D:\ ProgramData\ MongoDB\ data

Logpath: log file directory, logappend: log is recorded by adding method, dbpath database file storage location (4) cmd console to D:\ mongodb-2.2.2\ bin mongod.exe-- config D:\ mongodb-2.2.2\ mongod.cfg-- install installed successfully MongoDB service (5) start and stop service: net start/stop MongoDB (6) start D:\ mongodb-2.2.2\ bin\ mongo.exe to connect to the database Enter: db.test.save ({aura 1}) db.test.find () to test whether the database is installed successfully (7) Uninstall the MongoDB service: d:\ mongodb-2.2.2\ bin\ mongod.exe-- remove Note: (1) if the directory referred to by dbpath does not exist, it defaults to\ data\ db

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report