起风了

“路海长 青夜旷 越过群山追斜阳”

使用php连接redis

1.推荐一个php操作redis的使用文档的地址: https://github.com/phpredis/phpredis/ 2.建立一个connect.php文件: 实例化类并连接: $redis = new Redis(); $redis->connect("127.0.0.1",6379) 3.记得一定要先开启redis server服务,后台执行 redis目录下执行: ./bin/redis-server ./redis.conf 4....

php redis扩展安装

1.首先从官网下载php redis扩展文件: 下载地址:https://github.com/phpredis/phpredis/archive/develop.zip 2.将下载下来的文件解压缩: unzip develop.zip 3.进入解压后的文件,执行:phpize,生成configure工具 4.使用configure工具 ./configure -with-php-config=/usr/bin/php-config 5.安装扩展: make ...

redis的安装方法和简单使用

1.redis是C语言开发,安装redis需要先将官网下载的源码进行编译,编译依赖gcc环境,如果没有gcc环境,需要先安装gcc; 安装gcc环境的命令: yum install gcc-c++(联网下载安装) 执行上面的命令后linux会自动下载安装 2. 使用filezilla上传redis压缩包到linux服务器,解压命令: tar -zxvf redis-3.2.0.ta...

分布式锁的几种典型实现

分布式锁的几种典型实现缩略图
insert into t_ms_lock(name,desc) values (‘name’,’desc’);因为我们对name做了唯一性约束,这里如果有多个请求同时提交到数据库的话,数据库…