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.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: