美文网首页
Centos 安装Redis

Centos 安装Redis

作者: 师娘哪里去了 | 来源:发表于2020-03-21 08:14 被阅读0次

安装

redis使用yum安装比较简单,直接yum安装即可

yum install redis -y

配置

打开redis.conf文件,一般默认在/etc/redis

vi redis.conf

#找到并简单修改
...
daemonize no
#将redis作为一个守护进程开启,修改为
daemonize yes
...

#不存内容到磁盘
#找到并注释掉以下内容

#save 900 1
#save 300 10
#save 60 10000

#添加
save ""

启动

redis-server /etc/redis.conf
#查看进程
ps -ef|grep redis-server
root      5832     1  0 08:09 ?        00:00:00 redis-server 127.0.0.1:6379 
root      5843  1263  0 08:14 pts/0    00:00:00 grep redis-server

相关文章

网友评论

      本文标题:Centos 安装Redis

      本文链接:https://www.haomeiwen.com/subject/wqgeyhtx.html