本文共 913 字,大约阅读时间需要 3 分钟。
1、下载
redis:http://redis.io/download
phpredis:https://github.com/phpredis/phpredis
2、安装
$ wget http://download.redis.io/releases/redis-3.2.0.tar.gz$ tar xzf redis-3.2.0.tar.gz$ cd redis-3.2.0$ make
#mkdir -p /usr/local/redis/bin
#mkdir -p /usr/local/redis/var
#mkdir -p /usr/local/redis/etc #cp redis-benchmark redis-check-aof redis-check-dump redis-cli redis-server mkreleasehdr.sh /usr/local/redis/bin/ #cp redis.conf /usr/local/redis/etc/ redis.conf文件内容修改 daemonize yes pidfile /usr/local/redis/var/redis.pid logfile "/usr/local/redis/var/redis.log" 运行redis #/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf 安装phpredis #tar xvf phpredis-2.2.7.tar.gz #phpize#./configure --with-php-config=/usr/bin/php-config#make && make install #touch /etc/php.d/redis.ini [root@localhost phpredis-2.2.7]# cat /etc/php.d/redis.ini; Enable redis extension moduleextension=redis.so 重启httpd:service httpd restart
转载地址:http://rdjqd.baihongyu.com/