yum install phpredis -y
If you use Centos’s own php, make sure php-devel is installed. Otherwise, execute:
yum install php-devel -y (the redis extension cannot be loaded without installation)
Connect to the Redis server
/ /Connecting to Redis server on localhost
The above introduces the installation of redis and the use of redis in PHP, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.