This is the 23rd day of my participation in the More text Challenge. For more details, see more text Challenge
If ❤️ my post is helpful, please comment, follow, or like. This is the greatest encouragement for me to continue my technical creation. More past posts are on my personal blog
MongoDB Installation
Directing a profile
MongoDB is a database based on distributed file storage. Written in C++ language. Designed to provide scalable, high-performance data storage solutions for WEB applications.
Its biggest features are:
- It is especially suitable for storing large amounts of unstructured and irregular data
- A single table can store PB level of data, but the read and write efficiency is still as good as MySQL
Its limitations:
- SQL is not supported, table query is not supported, and transaction is not supported
- The highly optimized query mode is not supported
Why is MongoDB particularly good for crawlers
- The crawler crawls a lot of data
- Crawlers are mainly written scenes, and a large number of data are captured and stored
- The rules and structure of the data captured by the crawler are random
So without further delay, let’s install and learn to use it
Installing the MongoDB Database
First search openDirecting a website, the choice ofSoftware
Under theCommunity Server
The community version is downloaded
Select your system, the version you need, and download it. Here is the Window system, MongoDB 4.2.6 is the latest stable version. But sometimes you find outPackage
It loads very, very slowly, and it doesn’t even download.
Since the official website download can not do, we can directly go to mongodb download list, download their own version. I download here mongodb-win32-x86_64-2012plus-4.2.6-signed.msi
If you are a Mac/Linux classmate, you do not need to directly search the corresponding brew/yum command to install
When the download is complete, double-click to run and clickNext
Agree to terms agreement,Next
Select a custom installation mode
Specify the installation directory toD: / Dev/env \ mongodb4.2.6
.Next
Service Configuration: Pay attention to Service Configuration
- Install MongoDB as a Service Adds MongoDB to the list of computer services.
- Data Directory/Log Directory Indicates whether you want the path. And then the next step
Install MongoDB Compass is asking if you need to Install the MongoDB Compass Visual manipulation tool.
I recommend canceling the installation of MongoDB Compass. The presence or absence of visualization does not affect MongoDB itself. And since the MongoDB Compass is available overseas, it’s expected to take another hour or more and not necessarily work.
There are also alternatives to MongoDB Compassrobo3t
/NoSQLBoostrap
Also widely praisedSo I recommend canceling the MongoDB Compass installation“And then the next step
Start installation & Installation completed
Finally, theD: / Dev/env \ mongodb4.2.6 \ bin
Path configuration toThe environment variable
We’re done
Check whether MongDB is successfully installed
Right-click on My Computer > Administration > Services and Applications > Services > to see if it is in the listMongoDB ServerSometimes a list of services appearsI didn't refresh
Right click on the listrefresh
Exists in the listMongoDB ServerService and inStart state
(Right click on the service and start it without starting), and then browser accesshttp://localhost:27017/
The default mongodb port number is 27017. If the following information is displayed, the installation is successful
If no, check whether port 27017 is occupied. Open the CMD command line, as an example:
#Check whether port 27017 is occupiedC: \ Users \ Abo > netstat ano | findstr searches "27017" agreement local address External address state PID TCP 127.0.0.1:27017 0.0.0.0:0 LISTENING 6648
#Check which program occupies the PID: 6648 processC: \ Users \ Abo > tasklist | findstr searches 6648 bug. Exe Services 0 6648 to 164904 K
#Close the bug.exe process
C:\Users\Abo>taskkill /f /t /im bug.exe
Copy the code