Centos6.5 environment to install php5.5.30 redis extension introduction, centos6.5redis
1. Download the package wget http://pecl.php.net/get/redis-2.2.5.tgz 2. Unzip tar zxvf redis-2.2.5.tgz 3. Enter the installation directory cd redis-2.2.5 4. Use phpize to generate the configure configuration file/usr/local/php/bin/phpize 5. (fill in the php configuration file path ). /configure -- with-php-config =/usr/local/php/bin/php-config 6. Compile make 7. After installing make install, the following installation path/usr/local/php-5.5.30/lib/php/extensions/no-debug-non-zts-20121212/ls appears, you can see. so file and then assemble the address:/usr/local/php-5.5.30/lib/php/extensions/no-debug-non-zts-20121212/redis. so 8. Configure php to support vi/usr/local/php/etc/php. ini add extension =/usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/redis. so 9. Enable php, redis, nginx 10, and test $ redis = new Redis (); $ redis-> connect ("192.168.1.128", 6379 ); $ redis-> set ("username", "zhangsan"); echo $ redis-> get ("user: userid: 10: username "); $ redis-> lpush ("list", "helloWorld"); $ redis-> lpush ("list", "goodMorning"); $ redis-> lpush ("list ", "what"); $ list = $ redis-> lrange ("list", 0,-1); print_r ($ list); the test is normal.