In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Start by downloading the Community Edition from https://www.mongodb.com/download-center#community, and the Enterprise Edition is similar.
two。 Double-click to run the installation to customize the installation path, which is the default path (C:\ Program Files\ MongoDB\ Server\ 3.4)
Take the next step all the way until the installation is complete.
3. Create a data storage directory (I put it here in D:\ MongoDB\ data).
D:\ MongoDB\ data creates a db directory and a log directory to store database files and log files, respectively.
4. The creation configuration file mongod.cfg is stored in the D:\ MongoDB directory.
SystemLog: destination: file path: d:\ MongoDB\ data\ log\ mongod.logstorage: dbPath: d:\ MongoDB\ data\ db
For more configuration, please see the official website document: https://docs.mongodb.com
5. Run the command prompt as an administrator (otherwise you will not have permission to create and enable the Windows service):
Sc.exe create MongoDB binPath= "C:\ Program Files\ MongoDB\ Server\ 3.4\ bin\ mongod.exe-- service-- config=\" D:\ MongoDB\ mongod.cfg\ "" DisplayName= "MongoDB" start= "auto" net start MongoDB
PS: the command to delete the MongoDB Windows service is: sc delete MongoDB
At this point, MongoDB for Windows Service has been installed.
During use, you may encounter the following errors:
1. Unable to create another system semaphore.
Just go to the MongoDB database directory (for example, D:\ MongoDB\ data\ db), delete the mongod.lock in this folder, and restart the MongoDB service.
Summary
The above are the detailed steps of installing MongoDB 3.4 to run as Windows service. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.