美文网首页
Redis的安装及其在laravel中使用

Redis的安装及其在laravel中使用

作者: biaoqianwo | 来源:发表于2017-08-21 17:18 被阅读17次

安装

windows

laravelacademy.org/post/228.html

下载地址已经移到 https://github.com/MicrosoftArchive/redis/releases

centos

yum install redis

修改/etc/redis.conf 

daemonize no ==> daemonize yes

开启后台进程

redis-server /etc/redis.conf

客户端连接

redis-cli

或者

redis.io/download 下载最新稳定版

wget http://download.redis.io/releases/redis-4.0.1.tar.gz

tar xzf redis-4.0.1.tar.gz

cd redis-4.0.1

make

修改redis.conf

daemonize no ==> daemonize yes

开启后台进程

src/redis-server redis.conf

客户端连接

src/redis-cli


配置

通读redis.conf v4.0.1 

学习命令(近200个)

redis.io/commands

可以在线学习:try.redis.io/

laravel使用redis

安装配置及基本使用 laravelacademy.org/post/1839.html

redis服务  http://laravelacademy.org/post/228.html

实例

$count = 2;

$count =Redis::set('user:count', $count)->getPayload();

var_dump(Redis::get('user:count'),'====', $count);

输出

string(1) "2"

string(4) "===="

string(2) "OK"

相关文章

网友评论

      本文标题:Redis的安装及其在laravel中使用

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