您的位置:首页 > 数据库 > Redis

linux 下redis php扩展安装、redis服务安装

2016-04-04 21:25 645 查看
安装环境 linux centos6.5

说明:php redis扩展我使用的是2.2.7版本(目前最新 )|| redis服务器3.0.7(目前最新) 使用成功、没有什么版本不匹配问题

正常使用必须保证下面两个前提条件

使用redis的两个条件

1、php成功安装了redis扩展

安装参考
https://pecl.php.net/package/redis https://github.com/phpredis/phpredis#installation
2、安装redis服务、并启动
http://redis.io/download 里面有

Installation

Download, extract and compile Redis with:

$ wget http://download.redis.io/releases/redis-3.0.7.tar.gz $ tar xzf redis-3.0.7.tar.gz
$ cd redis-3.0.7
$ make

The binaries that are now compiled are available in the
src
directory. Run Redis with:

$ src/redis-server【默认加载redis.conf配置文件】

You can interact with Redis using the built-in client:

$ src/redis-cli
redis> set foo bar
OK
redis> get foo
"bar"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息