In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Here to share with you is the MongoDB installation configuration under Windows, including how to extract, establish a working directory and set system variables, and so on.
AD: WOT2014: special training session for user tag system and user digital operation
Installation file: official website http://www.mongodb.org/downloads
Select the file download for the corresponding system.
First, unzip the file.
Extract the compressed package, create a folder MongoDB on disk D, and copy all the .exe files in the compressed package to the D:MongoDB folder.
Second, establish a working directory.
1. Create a data storage directory D:\ mongodb\ data
2. Create a log file D:\ mongodb\ log\ mongodb.log
Third, set the system variable. To make it easy to manage mongodb from the console, you don't have to go into D:MongoDB every time.
My computer-- properties-- advanced-- environment variable-- path in the system variable, plus; D:\ MongoDB, pay attention to the semicolon before it. As shown below:
Start the mongdb service.
Enter mongod.exe-- dbpath=D:\ MongoDB\ data in the console. As shown below:
In this way, the service starts, and normally it will be displayed as follows:
Enter http://localhost:27017/ in the browser. Will show up.
You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number
The surface service has been started.
Do not close the current console window, set up another console and type mongo. As shown below:
Indicates that you have successfully connected to mongdb.
Fourth, start mongdb as a windows service at random.
Enter mongod.exe-- dbpath=D:\ mongodb\ data-- logpath=D:\ mongodb\ logs\ mongodb.log-- install in the console
Normally, it will show
5. Connect mongodb
Enter net start mongodb in the console and the prompt "Mongo DB service has started successfully" appears.
Enter mongo and you will connect to test. In my computer-- management-- services and applications, you can see that the MongoDB service has started successfully.
VI. Exception handling
If there is an error in the following figure:
First, let's see if the service is started. If the service is not started first, if the service has already been started, it may be that the mongo was shut down abnormally last time, resulting in the files storing data being occupied and locked. Just delete the mongod.lock file in D:\ MongoDB\ data. Just restart the service.
Original link: http://www.cnblogs.com/lsc183/archive/2012/08/16/mongodb.html
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.