2015-02-10 45 views
6

我剛剛在Windows上從here安裝了redis服務器,並以默認模式運行服務器,未指定任何配置文件。在Windows上的Redis - 配置文件

如何將配置文件(使用Windows)鏈接到服務器,以及如何指定保存dtb的文件夾?

文件夾看起來是這樣的:

  • 文件夾:C:\ Program Files文件\ Redis的\ CONF - 有一些模板的conf文件
  • 文件夾:C:\ Program Files文件\ Redis的\數據 - 空
  • 文件夾:C:\ Program Files文件\ Redis的\日誌 - 空
  • 文件:C:\ Program Files文件\ Redis的\ Redis的-SERVER.EXE
  • 文件:C:\ Program Files文件\ Redis的\ Redis的-CLI 。

回答

10

您需要做的就是運行redis-server.exe,然後運行配置文件的文件名。

如:

D:\Coding\RedisIO>redis-server.exe redis.windows.conf 

而且你需要添加/更改配置文件就行了數據庫文件:

# The filename where to dump the DB 
dbfilename dump.rdb 

及以下的,在配置文件中的條目

# The working directory. 
# 
# The DB will be written inside this directory, with the filename specified 
# above using the 'dbfilename' configuration directive. 
# 
# The Append Only File and the QFork memory mapped file will also be created 
# inside this directory. 
# 
# Note that you must specify a directory here, not a file name. 
# The working directory. 
# 
# The DB will be written inside this directory, with the filename specified 
# above using the 'dbfilename' configuration directive. 
# 
# The Append Only File and the QFork memory mapped file will also be created 
# inside this directory. 
# 
# Note that you must specify a directory here, not a file name. 
dir ./