PHP Redis 安装
?
PHP Redis 安装
?
目录:[?–?]
- 20.4.4.?php-redis.x86_64 : Extension for communicating with the Redis key-value store
- 20.4.4.1.?pecl 安装
- 20.4.4.2.?yum安装
- 20.4.4.3.?源码编译安装
- 20.4.4.4.?配置 redis.ini
- 20.4.4.5.?Session 配置
?
文章出处:http://netkiller.github.io/
?
20.4.4.?php-redis.x86_64 : Extension for communicating with the Redis key-value store
20.4.4.1.?pecl 安装
pecl install redis
20.4.4.2.?yum安装
8本文来源gao.dai.ma.com搞@代*码(网$
搞代gaodaima码
https://github.com/nicolasff/phpredis
yum search redisphp-redis.x86_64 : Extension for communicating with the Redis key-value storepython-redis.noarch : A Python client for redisredis.x86_64 : A persistent key-value database
20.4.4.3.?源码编译安装
安装git版本控制客户端
yum install git
从github仓库中克隆一份代码到本地
git clone git://github.com/nicolasff/phpredis.git
编译安装phpredis; 我暂时没有找到 pecl的phpredis源
cd phpredisphpize./configure --with-php-config=/srv/php-5.4.9/bin/php-configmake && make install
创建配置文件
20.4.4.4.?配置 redis.ini
cat > /srv/php-5.4.9/etc/conf.d/redis.ini <<EOFextension=redis.soEOF
查看安装情况
# php -m | grep redisredis
20.4.4.5.?Session 配置
使用 Redis 存储 Session 数据
session.save_handler = redissession.save_path = "tcp://127.0.0.1:6379"或者使用多个redissession.save_path = "tcp://host1:6379?weight=1, tcp://host2:6379?weight=2&timeout=2.5, tcp://host3:6379?weight=2"
搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:PHP Redis 装配
转载请注明原文链接:PHP Redis 装配
