• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

centos redis 安装

php 搞代码 3年前 (2022-01-23) 17次浏览 已收录 0个评论
文章目录[隐藏]

centos6.4+lnmp1.0

1.安装redis
$ wget http://download.redis.io/releases/redis-2.6.16.tar.gz
$ tar xzf redis-2.6.16.tar.gz
$ cd redis-2.6.16
$ make

2.启动服务
$ src/redis-server

3.测试
$ /redis-2.6.16/src/redis-cli
$ set test kk
$ get test

到这里都一切正常,但是怎么安装redis的PHP扩展?
网上各种教程试了都不行,死活装不成

回复讨论(解决方案)

你安装好PHP,直接加载php_redis扩展即可。

redis的官网都有,很多推荐

http://redis.io/clients

Predis ? ★ Repository JoL1hAHN Mature and supported
phpredis ? ★ Repository yowgi This is a client written in C as a PHP module.
Rediska ? Repository Homepage shumkov
RedisServer Repository OZ Standalone and full-featured class for Redis in PHP
Redisent ? Repository justinpoliey
Credis Repository colinmollenhour Lightweight, standalone, unit-tested fork of Redisent which wraps phpredis for best performance if available.

推荐:http://www.sitepoint.com/an-introduction-to-redis-in-php-using-predis/

本¥文来源gaodai$ma#com搞$代*码*网(搞代gaodaima码

其实是我不熟悉centos,配置PHP.INI需要重启php-fpm,我之前一直重启nginx所以一直以为没有安装成功。


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:centos redis 安装

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址