How to Install and Secure Redis on Centos7

Installing Redis

安装Redis之前,需要先添加Extra Packages for Enterprise Linux(EPEL) repository到服务器的包列表中。

yum install epel-release

等EPEL安装结束,使用yum安装redis

yum install redis -y

等安装完成,启动redis服务

systemctl start redis.service

将redis加到开机启动中

systemctl enable redis

查看redis的状态

systemctl status redis.service

一旦确认Redis正在运行(active状态),运行测试命令:

redis-cli ping

//output
PONG

Follow this How to Install and Secure Redis on Centos7