windows:mongodb

MongoDB

Scoop によるインストール。

> scoop install mongodb
Installing 'mongodb' (4.2.3) [64bit]
mongodb-win32-x86_64-2012plus-4.2.3-signed.msi (259.2 MB) [===================================================] 100%
Checking hash of mongodb-win32-x86_64-2012plus-4.2.3-signed.msi ... ok.
Extracting mongodb-win32-x86_64-2012plus-4.2.3-signed.msi ... done.
Running pre-install script...
Linking ~\scoop\apps\mongodb\current => ~\scoop\apps\mongodb\4.2.3
Creating shim for 'bsondump'.
Creating shim for 'mongo'.
Creating shim for 'mongod'.
Creating shim for 'mongodump'.
Creating shim for 'mongoexport'.
Creating shim for 'mongofiles'.
Creating shim for 'mongoimport'.
Creating shim for 'mongorestore'.
Creating shim for 'mongos'.
Creating shim for 'mongostat'.
Creating shim for 'mongotop'.
Persisting bin\mongod.cfg
Persisting data
Persisting log
'mongodb' (4.2.3) was installed successfully!
Notes
-----
Windows server 2012/2008 and Windows 7/8/8.1 need KB2999226 to provide Universal C Runtime support for Windows.
For more infomations, please refer to:
https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows

mongod shim use "C:\Users\tomoyan\scoop\apps\mongodb\current\bin\mongod.cfg" as the default config file.
To use a different config file, please run
"C:\Users\tomoyan\scoop\apps\mongodb\current\bin\mongod.exe --config NEW_CONFIG_FILE"
'mongodb' suggests installing 'extras/vcredist2017'.

ノート


Windows サーバー 2012/2008 および Windows 7/8/8.1 では、Windows のユニバーサル C ランタイムサポートを提供するために KB2999226 が必要です。
詳細については、以下を参照してください。
https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows

mongod shim は、デフォルト構成ファイルとして “C:\Users\tomoyan\scoop\apps\mongodb\current\bin\mongod.cfg” を使用します。
別の設定ファイルを使用するには、
“C:\Users\tomoyan\scoop\apps\mongodb\current\bin\mongod.exe –config NEW_CONFIG_FILE” を実行してください。
'mongodb' は 'extras/vcredist2017' のインストールを提案します。

PS > mongod --version
db version v4.2.3
git version: 6874650b362138df74be53d366bbefc321ea32d4
allocator: tcmalloc
modules: none
build environment:
    distmod: 2012plus
    distarch: x86_64
    target_arch: x86_64
PS > vi ~\scoop\apps\mongodb\current\bin\mongod.cfg
~\scoop\apps\mongodb\current\bin\mongod.cfg
# mongod.conf
 
# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/
 
# Where and how to store data.
storage:
  dbPath: C:\Users\tomoyan\scoop\apps\mongodb\4.2.3\data
  journal:
    enabled: true
#  engine:
#  mmapv1:
#  wiredTiger:
 
# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path:  C:\Users\tomoyan\scoop\apps\mongodb\4.2.3\log\mongod.log
 
# network interfaces
net:
  port: 27017
  bindIp: 127.0.0.1
 
 
#processManagement:
 
#security:
 
#operationProfiling:
 
#replication:
 
#sharding:
 
## Enterprise-Only Options:
 
#auditLog:
 
#snmp:
PS > sudo mongod --install 
PS > sudo net start MongoDB
MongoDB サービスを開始します.
MongoDB サービスは正常に開始されました。
  • windows/mongodb.txt
  • 最終更新: 2020/03/20 15:40
  • by ともやん