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


一、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,密碼生效


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM