Home>Article>Operation and Maintenance> How to install redis extension on linux
How to install redis extension on linux?
Related recommendations: [Linux video tutorial]
How to install the redis extension on Linux:
1. First download the php-redis extension package
2. Unzip and unpack and enter the directory. You can see the following:
3. Execute the phpize command in the php installation directory in this directory (if you don’t know the phpize path, you can use whereis phpize to query)
4. At this time, there will be more A configure file
5. Now it can be configured. --with-php-config tells the extension where to install it and automatically configures the compiler for us (once executed If an error is reported, it is possible that autoconf is not installed. Just execute the following yum install autoconf)
If an error is reported
Install GCC can be yum install gcc -y
6, compile make
##7, After the compilation is passed, execute make install After installation, you will be prompted for the directory where the extension is placed. Enter the directory and you will find the redis.so extension 9. Modify the php.ini file and add the following information Or enter the /etc/php.d directory to create the redis.ini file 10. After saving and exiting, restart the server. Check the phpinfo() information #The loading is successful. For more Redis related knowledge, please visit theRedis usage tutorialcolumn!
The above is the detailed content of How to install redis extension on linux. For more information, please follow other related articles on the PHP Chinese website!