Centos8安装Redis6.0.9
1. 环境准备:
安装虚拟机:Centos8
准备Redis:wget https://mirrors.huaweicloud.com/redis/
2.修改配置文件
修改redis.config配置文件中下图中红线处为yes
3.启动Redis服务
[root@localhost redis-6.0.9]# ./redis-server /usr/soft/redis-6.0.9/redis.conf
4.打开Redis终端
[root@localhost redis-6.0.9]# ./redis-cli
5.测试redis是否开启
127.0.0.1:6379> ping
PONG
127.0.0.1:6379>
5.查看Redis进程
[root@localhost src]# ps aux | grep redis-server
6.关闭redis
127.0.0.1:6379> SHUTDOWN [NOSAVE|SAVE]
7.物理机连接redis
bind该为0.0.0.0表示允许所有的机器连接
更改保护模式为no
关闭虚拟机的防火墙
[root@localhost redis-6.0.9]# systemctl stop firewalld.service