Tool preparation
https://www.mongodb.com/download-center
#Download community server
wget https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.6.5-signed.msi
#Download compass graphical management tool
wget https://downloads.mongodb.com/compass/beta/mongodb-compass-community-1.14.0-beta.2-win32-x64.exe?_ga=2.32424510.1600486838.1528162084-24234926.1528162084
#Here is an explanation of why you need to download compass again. It will be explained below
install
Install community server version
Don't check next
Install compass
All the way next
Start mongodb
create profile
systemLog:
destination: file
path: D:\dbdepot\mongodb\demo\log\mongod.log
storage:
dbPath: D:\dbdepot\mongodb\demo
Registration service
mongod.exe --config "D:\dbdepot\mongodb\demo.cfg" --install --serviceName "mongodb_demo1" --serviceDisplayName "mongodb_demo1"
Start Mongo service
net start mongodb_demo1
net stop mongodb_demo1
Install PHP extensions
# https://pecl.php.net/package/mongodb
Download the DLL file of mongodb corresponding to PHP environment in window
php.ini
extenstion = php_mongodb.dll
Restart Apache or PHP FPM