#yum安装redis服务
yum install epel-release
yum install redis
#yum安装php-redis扩展
wget http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
yum install php-redis
#测试
<?php
$redis = new Redis();
$redis->connect(‘127.0.0.1‘,6379);
$redis->set(‘test‘,‘hello world!‘);
echo $redis->get(‘test‘);
?>
本文出自 “技术屌丝” 博客,谢绝转载!
原文地址:http://yeqing.blog.51cto.com/3159086/1649974