日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

【转载】redis开启远程访问

發布時間:2025/3/15 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【转载】redis开启远程访问 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
redis默認只允許本地訪問,要使redis可以遠程訪問可以修改redis.conf 打開redis.conf文件在NETWORK部分有說明
################################## 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
解決辦法:注釋掉bind 127.0.0.1可以使所有的ip訪問redis 若是想指定多個ip訪問,但并不是全部的ip訪問,可以bind 注意 下面還有個說明
# Protected mode is a layer of security protection, in order to avoid that # Redis instances left open on the internet are accessed and exploited. # # When protected mode is on and if: # # 1) The server is not binding explicitly to a set of addresses using the #? ? "bind" directive. # 2) No password is configured. # # The server only accepts connections from clients connecting from the # IPv4 and IPv6 loopback addresses 127.0.0.1 and ::1, and from Unix domain # sockets. # # By default protected mode is enabled. You should disable it only if # you are sure you want clients from other hosts to connect to Redis # even if no authentication is configured, nor a specific set of interfaces # are explicitly listed using the "bind" directive. protected-mode yes
在redis3.2之后,redis增加了protected-mode,在這個模式下,即使注釋掉了bind 127.0.0.1,再訪問redisd時候還是報錯,如下
(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 no 轉載自:https://www.cnblogs.com/liusxg/p/5712493.html

轉載于:https://www.cnblogs.com/darknebula/p/8596190.html

與50位技術專家面對面20年技術見證,附贈技術全景圖

總結

以上是生活随笔為你收集整理的【转载】redis开启远程访问的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 国产精品福利在线 | 黄色天堂网 | 熟女av一区二区 | 免费久久网站 | 国产99久久久国产精品免费看 | 国产精品视频一区二区三区 | 亚洲一卡二卡在线 | 99re只有精品 | 国内精品视频在线观看 | 日本少妇毛茸茸 | 欧美精品性生活 | 天天干天天要 | 大乳村妇的性需求 | 找个毛片看看 | 琪琪色影音先锋 | 18禁免费无码无遮挡不卡网站 | 亚洲色图自拍 | 国产手机在线观看 | 欧美黑粗大 | 日韩偷拍一区 | 在线看黄色网址 | 国产男女激情 | 亚洲蜜桃av一区二区 | 羞辱狗奴的句子有哪些 | 免费毛片观看 | 手机av免费在线观看 | 天天色av| 亚洲成人h| 饥渴放荡受np公车奶牛 | 国产视频一级 | 日韩一级淫片 | 中文字幕无人区二 | 色图社区 | www成年人 | 岛国av免费观看 | 女儿的朋友在线播放 | 天堂素人 | 操操综合网 | 日韩av第一页 | 日韩一区二区免费播放 | 很黄很色的视频 | 欧美日韩免费看 | 春色激情站 | 熟妇人妻精品一区二区三区视频 | 色香蕉在线 | 精品人妻人伦一区二区有限公司 | 一区二区国产视频 | 2025av在线播放 | 国产欧美综合在线 | 国产一区二区三区在线 | 国产精品一亚洲av日韩av欧 | 乱色熟女综合一区二区三区 | 奇米狠狠操 | 久久久久国色av免费观看性色 | 毛片无码一区二区三区a片视频 | 欧日韩不卡在线视频 | 妺妺窝人体色www聚色窝仙踪 | 好吊一区二区三区视频 | 欧洲一区二区三区四区 | 久久久久久久久影院 | 天堂欧美城网站网址 | 欧美一级黄视频 | 日韩影视一区二区三区 | 国产91欧美 | 粉嫩av国产一区二区三区 | 亚洲无av | 免费在线网站 | 精品国产乱码久久久久 | 91精彩刺激对白 | 丝袜操 | 免费日本特黄 | 99国产精品久久久久久久 | 亚洲最大av | 久久深夜视频 | 亚洲综合色在线观看 | 青青草视频免费播放 | 免费a在线观看播放 | 中文字幕在线观看亚洲 | 自拍三级视频 | 91免费福利 | 亚洲AV成人无码一二三区在线 | 中文字幕人妻丝袜乱一区三区 | 国产精品无码电影在线观看 | 精品盗摄一区二区三区 | 欧美一区二区三区爱爱 | 久久久无码人妻精品一区 | 97在线观看免费视频 | 国产一区二区三区观看 | 久久人人爽人人爽人人片 | 丝袜在线一区 | 国产伦理在线 | 夜夜骚av| 浪漫樱花动漫在线观看免费 | 韩国伦理片在线播放 | 亚洲国产理论 | 一级片中文字幕 | 少妇一级淫片免费看 | 成人免费看片网站 | 中文字幕日韩在线观看 |