AWS - redis

 

 

 


Php Package

 

yum install php-pecl-redis # Centos 7

 


Check Redis Script

 

test-redis.php

<?php
   $redis = new Redis();
   $redis->connect('127.0.0.1', 6379);
   echo "Server is running: " . $redis->ping();
?>

 


Php Session in Redis

/etc/httpd/conf.d/php.conf   # Centos 7

php_value session.save_handler "files"
php_value session.save_path    "/var/lib/php/mod_php/session"