聚合伺服器搭建方法「阿里雲伺服器搭建網站教程」

一. 登錄阿里雲伺服器並安裝redis

Download, extract and compile Redis with:

$ wget https://download.redis.io/releases/redis-6.2.1.tar.gz
$ tar xzf redis-6.2.1.tar.gz
$ cd redis-6.2.1
$ make

The binaries that are now compiled are available in the src directory. Run Redis with:

$ src/redis-server

或者執行,nohup src/redis-server & 來後台運行

You can interact with Redis using the built-in client:

$ src/redis-cli
redis> set foo bar
OK
redis> get foo
"bar"

二. 在安全組規則裡面添加訪問規則,開啟6379埠。

在阿里雲伺服器搭建redis環境,以及遇到的問題和解決方案

三. 連接redis的時候,出現
redis.exceptions.ResponseError: DENIED Redis is running in protected mode because protected mode is enabled 錯誤

在阿里雲伺服器搭建redis環境,以及遇到的問題和解決方案

這時,設置protected-mode no即可

在阿里雲伺服器搭建redis環境,以及遇到的問題和解決方案

最後用 Another Redis DeskTop Manager輸入阿里雲主機和埠,即可連接redis資料庫。

原創文章,作者:投稿專員,如若轉載,請註明出處:https://www.506064.com/zh-tw/n/252272.html

(0)
打賞 微信掃一掃 微信掃一掃 支付寶掃一掃 支付寶掃一掃
投稿專員的頭像投稿專員
上一篇 2024-12-14 02:15
下一篇 2024-12-14 02:15

相關推薦

發表回復

登錄後才能評論