MongoDB WiredTiger 配置
MongoDB WiredTiger configuration
我正在尝试使用 Wired Tiger 存储引擎在我的本地计算机上安装 MongoDB,但遇到了一些问题。我下载了二进制文件并按照指南将其安装到 C:\MongoDB。这是使用默认引擎 MMAPV1 安装的,但我想将其更改为 Wired Tiger。为此,我只使用了以下命令。
mongod.exe --storageEngine "wiredTiger" --dbpath "c:\mongodb\data\wt"
应该提到我也安装了修补程序,但仍然遇到同样的问题。
这个命令似乎有效,因为它在上面的指定文件夹中创建了一堆文件,例如 WiredTiger
、storage.bson
、WiredTiger.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
的值。
就我个人而言,为了使这项工作正常进行,我必须通过以下命令删除该服务:.\mongod.exe --remove
然后进行安装,但是这次指定了存储引擎等。因此命令变为
.\mongod.exe --dbpath c:\mongodb\data\wt --logpath c:\mongodb\log\mongo.log --storageEngine wiredTiger --install
输入shell并使用命令db.serverStatus().storageEngine
世界突然变得更快乐{ "name" : "wiredTiger" }
我正在尝试使用 Wired Tiger 存储引擎在我的本地计算机上安装 MongoDB,但遇到了一些问题。我下载了二进制文件并按照指南将其安装到 C:\MongoDB。这是使用默认引擎 MMAPV1 安装的,但我想将其更改为 Wired Tiger。为此,我只使用了以下命令。
mongod.exe --storageEngine "wiredTiger" --dbpath "c:\mongodb\data\wt"
应该提到我也安装了修补程序,但仍然遇到同样的问题。
这个命令似乎有效,因为它在上面的指定文件夹中创建了一堆文件,例如 WiredTiger
、storage.bson
、WiredTiger.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
的值。
就我个人而言,为了使这项工作正常进行,我必须通过以下命令删除该服务:.\mongod.exe --remove
然后进行安装,但是这次指定了存储引擎等。因此命令变为
.\mongod.exe --dbpath c:\mongodb\data\wt --logpath c:\mongodb\log\mongo.log --storageEngine wiredTiger --install
输入shell并使用命令db.serverStatus().storageEngine
世界突然变得更快乐{ "name" : "wiredTiger" }