安装 redis

官方下载地址:http://redis.io/download,但是官方没有64位的Windows下的可执行程序。

目前有个开源的托管在github上, 地址:https://github.com/ServiceStack/redis-windows 点击这个地方,下载文件并解压到自己的电脑目录下。

 

修改redis.windows.conf文件中的: maxmemory 1024000000

 

 

之后新开DOS 执行 redis-server.exe redis.windows.conf --maxmemory 200M  这里只是去链接redis 需要再用“redis-cli.exe” 去开启(另开dos 页面)

 

 

新开 redis-cli.exe

 

 

 如果 已经安装了PHP的redis拓展(安装PHP-redis拓展 可以参考我:https://www.cnblogs.com/G921123/p/10499877.html)

PHP 执行:

//连接redis
$redis = new Redis();
$redis->connect('localhost',6379);
$data = $redis->get('name');
echo $data;
posted @ 2019-11-27 10:18  现世中的素人  阅读(78)  评论(0编辑  收藏  举报