当前位置:首页 > 知识库 > 正文

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

一. 登录阿里云服务器并安装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-cliredis> set foo barOKredis> get foo"bar"

二. 在安全组规则里面添加访问规则,开启6379端口。

阿里云服务器搭建网站教程(聚合服务器搭建方法)  第1张

三. 连接redis的时候,出现redis.exceptions.ResponseError: DENIED Redis is running in protected mode because protected mode is enabled 错误

阿里云服务器搭建网站教程(聚合服务器搭建方法)  第2张

这时,设置protected-mode no即可

阿里云服务器搭建网站教程(聚合服务器搭建方法)  第3张

最后用 Another Redis DeskTop Manager输入阿里云主机和端口,即可连接redis数据库。

发表评论

最新文章

推荐文章