Bytes ------------------------------------------------------------------------------------------------------
First, explain the following Linux commands:
./Configure # script configuration tool
./Configure -- help # view the command line options of the script configuration tool configure
/Usr/local/php/bin/phpsize # The phpsize command is used to expand the module in compiled PHP.
--------------------------- @ Author chenwei <www. chenwei. ws> -------------------------------
1. download the software package you want to install and decompress it to obtain the directory (for example, phpredis)
2. Go to the software package directory (cd phpredis)
3. Run the phpsize command (/usr/local/php/bin/phpsize)
4. configure (./configure -- with-php-config =/usr/local/php/bin/php-config # specify the configuration when installing PHP)
(Appendix: General method for specifying the installation directory location: -- with-php-mysql =/usr/local/mysql # specifying the MySQL database location)
5. Compile and install (make & make install)
6. The following prompt appears when the compilation is successful =>
At this point, the generated redis. so file is in this directory, the local browser can also view the file: // usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
7. Modify the PHP configuration file (vim/usr/local/php/etc/php. ini)
Add: extention = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/redis. so ";
8. Restart the server (/root/lnmp reload # restart nginx and PHP based on your own environment)
Use phpinfo () to view the PHP configuration list in the browser. OK. The installation is complete.
Bytes ------------------------------------------------------------------------------------------------------