centos7 redis安装


https://cloud.tencent.com/developer/article/1759779

常用命令

// 启动redis
[root@VM-0-8-centos ~]# systemctl start redis.service
 
// 验证redis是否启动
[root@VM-0-8-centos ~]# redis-cli
 
 //配置redis,随系统启动服务
[root@VM-0-8-centos ~]# systemctl enable redis.service
 
 
// 其它命令
// 关闭随机启动
[root@VM-0-8-centos ~]# systemctl disable redis.service
// 停止服务
[root@VM-0-8-centos ~]# systemctl stop redis.service
// 重启服务
[root@VM-0-8-centos ~]# systemctl restart redis.service