最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Redis3.2開(kāi)啟遠(yuǎn)程訪問(wèn)詳細(xì)步驟

 更新時(shí)間:2018年03月04日 10:00:08   投稿:wdc  
redis默認(rèn)只允許本地訪問(wèn),要使redis可以遠(yuǎn)程訪問(wèn)可以修改redis.conf

redis默認(rèn)只允許本地訪問(wèn),要使redis可以遠(yuǎn)程訪問(wèn)可以修改redis.conf
 打開(kāi)redis.conf文件在NETWORK部分有說(shuō)明

################################## NETWORK #####################################
 
# By default, if no "bind" configuration directive is specified, Redis listens
# for connections from all the network interfaces available on the server.
# It is possible to listen to just one or multiple selected interfaces using
# the "bind" configuration directive, followed by one or more IP addresses.
#
# Examples:
#
# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1 ::1
#
# ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the
# internet, binding to all the interfaces is dangerous and will expose the
# instance to everybody on the internet. So by default we uncomment the
# following bind directive, that will force Redis to listen only into
# the IPv4 lookback interface address (this means Redis will be able to
# accept connections only from clients running into the same computer it
# is running).
#
# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
# JUST COMMENT THE FOLLOWING LINE.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bind 127.0.0.1

使redis可以遠(yuǎn)程訪問(wèn)只要注釋掉redis.conf配置文件中的 bind 127.0.0.1 即可以使所有的ip訪問(wèn)redis

若是想指定多個(gè)ip訪問(wèn),但并不是全部的ip訪問(wèn),可以bind多個(gè)IP

注意

在redis3.2之后,redis增加了protected-mode,在這個(gè)模式下,即使注釋掉了bind 127.0.0.1,再訪問(wèn)redisd時(shí)候還是報(bào)錯(cuò),如下

(error) DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the '--protected-mode no' option. 4) Setup a bind address or an authentication password. NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.

解決方法是修改原protected-mode yes為protected-mode no

保存配置文件重啟redis即可

相關(guān)文章

  • Redis中常見(jiàn)的幾種集群部署方案

    Redis中常見(jiàn)的幾種集群部署方案

    本文主要介紹了Redis中常見(jiàn)的幾種集群部署方案,文中通過(guò)示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2022-03-03
  • 詳解Redis如何多規(guī)則限流和防重復(fù)提交

    詳解Redis如何多規(guī)則限流和防重復(fù)提交

    市面上很多介紹redis如何實(shí)現(xiàn)限流的,但是大部分都有一個(gè)缺點(diǎn),就是只能實(shí)現(xiàn)單一的限流,但是如果想一個(gè)接口兩種規(guī)則都需要滿(mǎn)足呢,使用本文就來(lái)介紹一下redis實(shí)現(xiàn)分布式多規(guī)則限流的方式吧
    2023-12-12
  • 如何打造redis緩存組件

    如何打造redis緩存組件

    文章介紹了如何使用熱插拔AOP、反射、Redis自定義注解和SpringEL表達(dá)式來(lái)打造一個(gè)優(yōu)雅的Redis緩存組件,通過(guò)這種方式,可以重構(gòu)和簡(jiǎn)化緩存代碼,并提供了Redis配置和自定義注解的詳細(xì)說(shuō)明,文章還包含了AOP測(cè)試的總結(jié),并鼓勵(lì)讀者參考和支持
    2024-12-12
  • Redis緩存高可用集群詳解

    Redis緩存高可用集群詳解

    Redis集群提供了哨兵模式和高可用集群模式兩種方案,前者適合低并發(fā),配置復(fù)雜,主從切換可能導(dǎo)致瞬斷;后者通過(guò)多主多從結(jié)構(gòu)提高可用性和性能,支持線性擴(kuò)展,配置簡(jiǎn)單,搭建Redis集群至少需要三個(gè)主節(jié)點(diǎn)
    2024-10-10
  • redis-copy使用6379端口無(wú)法連接到Redis服務(wù)器的問(wèn)題

    redis-copy使用6379端口無(wú)法連接到Redis服務(wù)器的問(wèn)題

    這篇文章主要介紹了redis-copy使用6379端口無(wú)法連接到Redis服務(wù)器的問(wèn)題的相關(guān)資料,需要的朋友可以參考下
    2023-05-05
  • windows上修改redis端口號(hào)的操作步驟

    windows上修改redis端口號(hào)的操作步驟

    redis是一個(gè)開(kāi)源的內(nèi)存數(shù)據(jù)結(jié)構(gòu)存儲(chǔ)系統(tǒng),常用做數(shù)據(jù)庫(kù)、緩存和消息代理,默認(rèn)的端口號(hào)為6379,那么如何在windows上修改redis端口號(hào),接下來(lái)本文給大家詳細(xì)介紹了windows上修改redis端口號(hào)的操作方法,需要的朋友可以參考下
    2024-02-02
  • 緩存替換策略及應(yīng)用(以Redis、InnoDB為例)

    緩存替換策略及應(yīng)用(以Redis、InnoDB為例)

    本文以Redis、InnoDB為例給大家講解緩存替換策略及應(yīng)用,本文給大家提到五種置換策略,通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),需要的朋友參考下吧
    2021-07-07
  • Redis哨兵模式介紹

    Redis哨兵模式介紹

    這篇文章介紹了Redis哨兵模式,對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2022-02-02
  • 解決Redis報(bào)錯(cuò)MISCONF?Redis?is?configured?to?save?RDB?snapshots

    解決Redis報(bào)錯(cuò)MISCONF?Redis?is?configured?to?save?RDB?snap

    這篇文章主要給大家介紹了關(guān)于如何解決Redis報(bào)錯(cuò)MISCONF?Redis?is?configured?to?save?RDB?snapshots的相關(guān)資料,文中通過(guò)代碼介紹的非常詳細(xì),需要的朋友可以參考下
    2023-11-11
  • 利用Redis如何實(shí)現(xiàn)自動(dòng)補(bǔ)全功能

    利用Redis如何實(shí)現(xiàn)自動(dòng)補(bǔ)全功能

    這篇文章主要給大家介紹了關(guān)于如何利用Redis如何實(shí)現(xiàn)自動(dòng)補(bǔ)全功能的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用Redis具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2019-09-09

最新評(píng)論

满城县| 平泉县| 珠海市| 印江| 剑阁县| 社会| 武平县| 五家渠市| 湘阴县| 安龙县| 蒙阴县| 澳门| 荥阳市| 红桥区| 醴陵市| 承德县| 宽甸| 延津县| 巴林左旗| 集贤县| 桃江县| 万全县| 宜川县| 南靖县| 乡宁县| 杂多县| 广水市| 东乡| 鄯善县| 缙云县| 清原| 荣成市| 宁河县| 陆河县| 中阳县| 洞口县| 长治市| 自贡市| 澎湖县| 安阳市| 凤庆县|