Linux下Redis使用

1. 简介

REmote DIctionary Server(Redis) 是一个由Salvatore Sanfilippo写的key-value存储系统.

2. 安装

安装方法如下:

# yum install redis hiredis hiredis-devel

3. 启动

先要修改启动文件

# vi /usr/lib/systemd/system/redis.service ExecStart=/usr/bin/redis-server /etc/redis.conf --daemonize no ==> ExecStart=/bin/redis-server /etc/redis.conf --daemonize no ExecStop=/usr/bin/redis-shutdown ==> ExecStop=/bin/redis-shutdown

 

# systemctl start redis
# systemctl enable redis

 

启动失败解决办法

# chown redis:redis -R /var/log/redis/

4. 命令

Redis 客户端的基本语法为

$ redis-cli

 

参考:
<
Redis教程>
<redis基础知识汇总>

posted @ 2017-06-14 19:12  北落不吉  阅读(321)  评论(0编辑  收藏  举报