聚合服务器搭建方法「阿里云服务器搭建网站教程」

一. 登录阿里云服务器并安装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/n/252272.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
投稿专员投稿专员
上一篇 2024-12-14 02:15
下一篇 2024-12-14 02:15

相关推荐

发表回复

登录后才能评论