windows系統上安裝Redis,並且設定Redis密碼

魔豆發表於2017-02-09

一、Windows版本的Redis下載

下載地址:https://github.com/MSOpenTech/redis/releases

我下載的是最新版的3.2

 

二、安裝Redis

我下載的是安裝版本,一路Next,即可完成安裝,並且安裝完成後會自動設為Windows服務,這個很贊,以前都是dos視窗一直開啟,分分鐘逼死強迫症的節奏

 

三、設定Redis密碼

開啟redis.windows-service.conf檔案,找到修改密碼這一段

################################## SECURITY ###################################

# Require clients to issue AUTH <PASSWORD> before processing any other
# commands.  This might be useful in environments in which you do not trust
# others with access to the host running redis-server.
#
# This should stay commented out for backward compatibility and because most
# people do not need auth (e.g. they run their own servers).
#
# Warning: since Redis is pretty fast an outside user can try up to
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
# requirepass foobared

加上這麼一行:

requirepass 這裡是你的密碼

重新啟動Redis,密碼生效

相關文章