redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多
安装很简单
12345 | [root@XiaoFeng local]# wget http://download.redis.io/releases/redis-3.0.5.tar.gz[root@XiaoFeng local]# tar -zxf redis-3.0.5.gz[root@XiaoFeng redis-3.0.5]# make[root@XiaoFeng local]# mv redis-3.0.5 ./redis[root@XiaoFeng redis]# vim redis.conf |
查找daemonize启用后台运行,默认端口号port 6379
将daemonize no改为daemonize yes
启动redis[root@XiaoFeng redis]# ./src/redis-server redis.conf
终止redis[root@XiaoFeng redis]# ./src/redis-cli -h 127.0.0.1 -p 6379 -a password shutdown
12345 | [root@XiaoFeng lnmp]#wget https://pecl.php.net/get/redis-2.2.7.tgz[root@XiaoFeng lnmp]# tar -zxf redis-2.2.7.tgz[root@XiaoFeng redis-2.2.7]# /usr/local/php/bin/phpize[root@XiaoFeng redis-2.2.7]# ./configure --with-php-config=/usr/local/php/bin/php-config[root@XiaoFeng redis-2.2.7]# make && make install |
配置PHP加载扩展[root@XiaoFeng redis-2.2.7]# vim /usr/local/php/etc/php.ini
extension=redis.so
查看phpinfo
连接测试
C:\Users\枫叶>telnet 192.168.1.125 6379
本文为 小风原创文章,转载无需和我联系,但请注明来自 小风博客www.hotxf.com