文書の表示以前のリビジョンバックリンク文書の先頭へ この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。 <html> <style> #result pre { height: 200px; overflow: scroll; overflow-x: hidden; font-size: 10px; } #source_code pre { height: 200px; overflow: scroll; overflow-x: hidden; font-size: 10px; } </style> </html> ====== MongoDB ====== ===== インストール ===== [[windows:scoop|Scoop]] によるインストール。\\ <code> > scoop install mongodb </code> <WRAP prewrap 100% #result> <code> 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'. </code> </WRAP> <WRAP center round info 100%> ノート ----- 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' のインストールを提案します。 </WRAP> ===== 動作確認 ===== <code powershell> 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 </code> ===== 設定 ===== <code powershell> PS > vi ~\scoop\apps\mongodb\current\bin\mongod.cfg </code> <WRAP prewrap 100% #source_code> <code autoconf ~\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: </code> </WRAP> ===== サービスのインストールと起動 ===== <code powershell> PS > sudo mongod --install PS > sudo net start MongoDB MongoDB サービスを開始します. MongoDB サービスは正常に開始されました。 </code> ===== 参考文献 ===== [[https://gist.github.com/basir/a812d6870c12d8bd2d53981bbeeefa7c|Scoop.md]]\\ windows/mongodb.txt 最終更新: 2020/03/20 15:40by ともやん