MongoDB WiredTiger配置

时间:2015-09-02 14:26:57

标签: mongodb wiredtiger

我正在尝试使用有线Tiger存储引擎在本地计算机上安装MongoDB并遇到一些问题。我下载了二进制文件,并按照指南将其安装到C:\ MongoDB。这是使用默认引擎MMAPV1安装的,但我想将其更改为有线老虎。为此,我只使用以下命令。

mongod.exe --storageEngine "wiredTiger" --dbpath "c:\mongodb\data\wt"

应该提到我还安装了此修补程序,仍然会遇到同样的问题。

似乎此命令有效,因为它在上面的指定文件夹中创建了一堆文件,例如WiredTigerstorage.bsonWiredTiger.turtle等。

PS C:\MongoDB\bin> .\mongod.exe --storageEngine "wiredTiger"
2015-09-02T15:07:41.266+0100 I CONTROL  Hotfix KB2731284 or later update is not installed, will zero-out data files
2015-09-02T15:07:41.270+0100 E NETWORK  [initandlisten] listen(): bind() failed errno:10048 Only one usage of each socke
t address (protocol/network address/port) is normally permitted. for socket: 0.0.0.0:27017
2015-09-02T15:07:41.271+0100 I STORAGE  [initandlisten] exception in initAndListen: 29 Data directory C:\data\db\ not fo
und., terminating
2015-09-02T15:07:41.271+0100 I CONTROL  [initandlisten] dbexit:  rc: 100
PS C:\MongoDB\bin> .\mongod.exe --storageEngine "wiredTiger" --dbpath C:\MongoDB\data\wt
2015-09-02T15:10:38.844+0100 I CONTROL  Hotfix KB2731284 or later update is not installed, will zero-out data files
2015-09-02T15:10:38.847+0100 E NETWORK  [initandlisten] listen(): bind() failed errno:10048 Only one usage of each socke
t address (protocol/network address/port) is normally permitted. for socket: 0.0.0.0:27017
2015-09-02T15:10:38.848+0100 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=7G,session_max=20000,e
viction=(threads_max=4),statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(c
lose_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] MongoDB starting : pid=24296 port=27017 dbpath=C:\MongoDB\data\w
t 64-bit host=WSX-111-9999
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] db version v3.0.6
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] git version: 1ef45a23a4c5e3480ac919b28afcba3c615488f2
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, buil
d=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB_VERSION=1_49
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] allocator: tcmalloc
2015-09-02T15:10:39.055+0100 I CONTROL  [initandlisten] options: { storage: { dbPath: "C:\MongoDB\data\wt", engine: "wir
edTiger" } }
2015-09-02T15:10:39.057+0100 I CONTROL  [initandlisten] now exiting
2015-09-02T15:10:39.057+0100 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2015-09-02T15:10:39.057+0100 I NETWORK  [initandlisten] shutdown: going to flush diaglog...
2015-09-02T15:10:39.057+0100 I NETWORK  [initandlisten] shutdown: going to close sockets...
2015-09-02T15:10:39.057+0100 I STORAGE  [initandlisten] WiredTigerKVEngine shutting down
2015-09-02T15:10:39.074+0100 I STORAGE  [initandlisten] shutdown: removing fs lock...
2015-09-02T15:10:39.075+0100 I CONTROL  [initandlisten] dbexit:  rc: 48
PS C:\MongoDB\bin> .\mongo.exe
2015-09-02T15:11:03.091+0100 I CONTROL  Hotfix KB2731284 or later update is not installed, will zero-out data files
MongoDB shell version: 3.0.6
connecting to: test
> db.serverStatus().storageEngine
{ "name" : "mmapv1" }
> exit
bye
PS C:\MongoDB\bin>

任何想法为什么这不是打球?我已将此安装为Windows服务,该服务启动正常,并且在使用shell时也使用命令

db.serverStatus().storageEngine

我得到了值mmappv1

1 个答案:

答案 0 :(得分:3)

就个人而言,为了让我能够正常工作,我必须通过以下命令删除服务:$("#ctl00_centerContent_GridView1 tr td a").each(function() { var url = $(this).attr("href"); var cid = getParameterByName(url, 'ccid'); if (cid == "542" || cid == "587"){ $(this) .attr('href','javascript:void(0)') .css({color:'black',cursor:'default'}); } }); function getParameterByName(url, name) { console.log(url) name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(url); return results ? decodeURIComponent(results[1].replace(/\+/g, " ")) : ""; }然后安装,但这次指定存储引擎等。所以命令变为

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <table id="ctl00_centerContent_GridView1"> <tr> <th scope="col"> <!-- COLUMN INFORMATION --> </th> </tr> <tr> <td style="font-weight:bold;"><a href="icard.aspx?cid=34&amp;cpid=345&amp;ccid=908">Insurance 1</a></td> <!-- link color by default is blue and turns orange on hover --> <td align="center">&nbsp;</td> <td align="center">Y</td> <td>908 as ave</td> <td align="center">N</td> <td align="center">N</td> <td align="center">Y</td> <td>Electronic</td> <td style="white-space:nowrap;">090-093-2311</td> <td>&nbsp;</td> </tr> <tr> <td style="font-weight:bold;"><a href="icard.aspx?cid=34&amp;cpid=345&amp;ccid=542">Insurance 2</a></td> <td align="center">&nbsp;</td> <td align="center">Y</td> <td>908 as ave</td> <td align="center">N</td> <td align="center">N</td> <td align="center">Y</td> <td>Electronic</td> <td style="white-space:nowrap;">090-093-2311</td> <td>&nbsp;</td> </tr> <tr> <td style="font-weight:bold;"><a href="icard.aspx?cid=34&amp;cpid=345&amp;ccid=587">Insurance 3</a></td> <td align="center">&nbsp;</td> <td align="center">Y</td> <td>908 as ave</td> <td align="center">N</td> <td align="center">N</td> <td align="center">Y</td> <td>Electronic</td> <td style="white-space:nowrap;">090-093-2311</td> <td>&nbsp;</td> </tr> <tr> <td style="font-weight:bold;"><a href="icard.aspx?cid=34&amp;cpid=345&amp;ccid=125">Insurance 4</a></td> <td align="center">&nbsp;</td> <td align="center">Y</td> <td>908 as ave</td> <td align="center">N</td> <td align="center">N</td> <td align="center">Y</td> <td>Electronic</td> <td style="white-space:nowrap;">090-093-2311</td> <td>&nbsp;</td> </tr> </table>

输入shell并使用命令.\mongod.exe --remove世界突然变得更加幸福.\mongod.exe --dbpath c:\mongodb\data\wt --logpath c:\mongodb\log\mongo.log --storageEngine wiredTiger --install