Install Redis cache with PHP in Ubuntu 18.04 LTS
Install Redis cache with PHP in Ubuntu 18.04 LTS
1, Install redis in ubuntu
sudo pecl install redis
2, Config redis with php7.2-fpm
sudo bash -c "echo extension=redis.so > /etc/php/7.2/fpm/conf.d/redis.ini"
3, Restart PHP
sudo service php7.2-fpm restart
Cool, Now you can use redis in php, example:
$redis = new Redis();
Thanks!!
Post a Comment