標籤:redis php
環境:Centos 6.6
PHP version 5.5.38
redis version:3.2.5
[[email protected] ~]# ntpdate time.windows.com[[email protected] ~]# yum -y install php55w php55w-cli php55w-common php55w-devel php55w-gd php55w-odbc php55w-mysql php55w-fpm nginx[[email protected] ~]# yum -y install gcc gcc-c++ libstdc++-devel tcl[[email protected] ~]# wget http://download.redis.io/releases/redis-3.2.5.tar.gz[[email protected] ~]# tar -zxf redis-3.2.5.tar.gz -C /usr/local/[[email protected] ~]# cd /usr/local/redis-3.2.5/[[email protected] redis-3.2.5]# make[[email protected] redis-3.2.5]# make test[[email protected] ~]# ln -s /usr/local/redis-3.2.5/src/redis-server /bin/[[email protected] ~]# ln -s /usr/local/redis-3.2.5/src/redis-cli /bin/[[email protected] ~]# wget https://codeload.github.com/phpredis/phpredis/tar.gz/2.2.4 -O phpredis-2.2.4.tar.gz[[email protected] ~]# tar -zxf phpredis-2.2.4.tar.gz[[email protected] ~]# cd phpredis-2.2.4[[email protected] phpredis-2.2.4]# phpize[[email protected] phpredis-2.2.4]# ./configure --with-php-config=/usr/bin/php-config[[email protected] phpredis-2.2.4]# make[[email protected] phpredis-2.2.4]# make installInstalling shared extensions: /usr/lib64/php/modules/[[email protected] phpredis-2.2.4]#[[email protected] phpredis-2.2.4]# make test[[email protected] ~]# /etc/init.d/php-fpm start[[email protected] ~]# /etc/init.d/nginx start[[email protected] ~]# chkconfig --add nginx[[email protected] ~]# chkconfig --add php-fpm[[email protected] ~]# chkconfig nginx on[[email protected] ~]# chkconfig php-fpm on[[email protected] ~]# php -m | grep -i redisredis[[email protected] ~]#
650) this.width=650;" src="http://s4.51cto.com/wyfs02/M00/8A/5C/wKiom1gubIqgwCZ8AAA6ossvi1c678.png" style="float:none;" title="1.png" alt="wKiom1gubIqgwCZ8AAA6ossvi1c678.png" />
650) this.width=650;" src="http://s2.51cto.com/wyfs02/M02/8A/5C/wKiom1gubIrD9YJIAAAMbV58754404.png" style="float:none;" title="2.png" alt="wKiom1gubIrD9YJIAAAMbV58754404.png" />
本文出自 “鵬城-醬油瓶” 部落格,謝絕轉載!
安裝redis支援php擴充