Memcache is an extension module for PHP, which should be guaranteed to have PHP environment before installation. First find the Phpize directory (if it is installed via Yum in/usr/bin, if they are not found, then #yum install Php-devel and reboot) after extracting the Memcache compressed package, "into the extracted folder." Next, use Phpzie to compile the memcache into the PHP extension module. #/usr/bin/phpize #./configure--with-php-config=/usr/bin/php-config (at this time if Error:memcache support requires zlib error, It means that there is no zlib, can be yum one, and then restart: #yum install-y zlib.x86_64 zlib-devel.x86_64) After the successful detection can be compiled memcache with make: #make #make Install Installing Shared extensions:/usr/lib64/php/modules/(the result above indicates that the extension will be installed in the/usr/lib64/php/modules/directory) Finally, you need to modify the PHP.ini configuration item, as follows: #vim/etc/php.ini (Find the following command in more than 700 lines, remove the comment, some can not be added manually) Extension_dir = "/usr/lib64/php/modules/" Extension = "memcache.so" extension = "pdo_mysql.so" Restart server can use #telnet memcached server IP address 11211来 to see if you can connect memcached You can then view the Memcache's configuration information via the Phpinfo function Source Link: http://www.wangzhanjianshegs.com/show-16-435-1.html website construction
Installing Memcache extensions under Linux