1.yum添加epel源

1
yum install epel-release

2.安装yum

1
yum install redis

3.Redis 服务端配置

1
vim  /etc/redis.conf

修改以守护进程方式启动:

找到redis.conf 并修改 daemonize no 为 daemonize yes

4.开启客户端要确保服务端启动

1
redis-server /etc/redis.conf

5.redis-server -v 查看版本

1
redis-server /etc/redis.conf

redis-cli ping  
PONG

测试启动 redis-cli ping 返回PONG,启动成功。

redis-cli  链接

6. 设置redis开机自启动

# chkconfig --add redis

# chkconfig redis on   开启开机启动

# chkconfig redis off   关闭开机启动

打开redis命令:service redis start

关闭redis命令:service redis stop

重启redis命令:service redis restart

相关文章:

  • 2021-09-04
  • 2021-12-31
  • 2021-07-28
  • 2021-04-02
  • 2021-05-25
  • 2021-11-12
  • 2021-12-31
猜你喜欢
  • 2022-12-23
  • 2021-09-01
  • 2021-12-18
  • 2021-10-20
  • 2022-01-14
相关资源
相似解决方案