安装redis扩展前,假设已经安装好php、nginx,他们的安装路径如下:
php安装目录:/usr/local/php
php.ini配置文件路径:/usr/local/php/etc/php.ini
Nginx安装目录:/usr/local/nginx
Nginx网站根目录:/usr/local/nginx/html
1、安装编译工具
yum install wget make gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel kernel keyutils patch perl
2、安装redis扩展
cd /usr/local/src #进入软件包存放目录
wget http://pecl.php.net/get/redis-3.1.0.tgz #下载
tar zxf redis-3.1.0.tgz #解压
cd redis-3.1.0 #进入...
1. redis查看当前所有的key
KEYS *
1
KEYS *
2. 查看当前redis的配置信息
CONFIG GET *
1
CONFIG GET *
3. MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the er...
memcache官方定义
Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
redis官方定义
Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
版权相同
它们都是使用的bsd协议,使用它的项目可以用于商业用户,不必发布二次修改的代码,...
redis是一个内存数据库,比memcache支持更丰富的value类型,新浪微博就使用redis来做缓存。
redis的源码安装
wget http://download.redis.io/redis-stable.tar.gz
tar -zxvf redis-stable.tar.gz
cd redis-stable
make
make test
make install
123456
wget http://download.redis.io/redis-stable.tar.gztar -zxvf redis-stable.tar.gzcd redis-stablemakemake testmake install
1.make时可能会报如下错误:
...