Centos6.5 environment to install php5.5.30 redis extension introduction, centos6.5redis

Source: Internet
Author: User
Tags zts

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.