0
点赞
收藏
分享

微信扫一扫

Redis 安装以及配置隧道连接

东林梁 2023-08-05 阅读 33

目录

1.CentOS

1. 安装Redis

2. Redis 启动和停⽌

3. 操作Redis

2.Ubuntu

1. 安装Redis

2. Redis 启动/停⽌

3. 操作 Redis

3.开启隧道

3.1 Xshell 配置隧道

3.2 windTerm 配置隧道

 3.3 FinalShell配置隧道

 4.可视化客户端连接 Another Redis Desktop Manager


1.CentOS

1. 安装Redis

#使⽤yum安装Redis
yum -y install redis

2. Redis 启动和停⽌

#查看是否启动
ps -ef|grep redis
#启动redis:
redis-server /etc/redis.conf &
#停⽌Redis
redis-cli shutdown
#或者直接杀掉进程(kill -9 强制杀掉, kill -15优雅退出)
kill -9 PID

3. 操作Redis

redis-cli

 

2.Ubuntu

1. 安装Redis

#使⽤apt安装Redis
apt install redis -y

2. Redis 启动/停⽌

#查看Redis状态
systemctl status redis-server
#启动redis
service redis-server start
#停⽌redis服务
service redis-server stop
#重启redis服务
service redis-server restart

3. 操作 Redis

使⽤以下命令启动redis客户端︰

redis-cli

 更多命令: https://redis.io/commands/set/

3.开启隧道

3.1 Xshell 配置隧道

 

 

 

 全部配置之后, 需要重新关闭连接, 打开连接才可以

后续访问云服务器的Redis, 就可以使⽤ 127.0.0.1 6379端⼝号(上图中配置的端

⼝号) 来访问

注意:

使⽤Redis时, 必须要打开 连接才可以!!!

使⽤Redis时, 必须要打开 连接才可以!!!

使⽤Redis时, 必须要打开 连接才可以!!!

3.2 windTerm 配置隧道

 

 

 

 开启隧道

 

 3.3 FinalShell配置隧道

 

 4.可视化客户端连接 Another Redis Desktop Manager

 

举报

相关推荐

0 条评论