Tag Archives: phpredis

Installing PHPRedis

6 Aug

Compile and Build PHPRedis

  1. mkdir -p /opt/redis/php
  2. cd /opt/redis/php
  3. wget –no-check-certificateĀ https://github.com/nicolasff/phpredis/zipball/master
  4. unzip nicolasff-phpredis-2.1.2-4-g765b9a7.zip
  5. cd nicolasff*/
  6. Ensure the phpize command from /usr/bin is executed.
    1. PATH=/usr/bin:$PATH; export PATH
  7. make clean (If this is your first time building PHPRedis, this command will fail and that is ok)
  8. phpize
  9. ./configure
  10. make
  11. make install
    • This Will copy redis.so to /usr/lib64/php/modules on 64 bit OS (production systems)
    • Will copy redis.so /usr/lib/php/modules on 32 bit OS (Dev systems)
  12. Specify redis.so as a PHP extension
    1. echo “extension=redis.so” > /etc/php.d/phpredis.ini
  13. Restart Apache
    1. service httpd restart

Reference

  1. The API is available hereĀ https://github.com/nicolasff/phpredis#readme.