This article from the point of light rain original, prohibit reprint.
Memcache
[[email protected] ~]# yum install libmemcached[[email protected] ~]# yum install memcached[[email Protected] ~]# memcached-m 512-u Nobody-vvslab class 1:chunk size Perslab 10922slab class 2:chunk Siz E-Perslab 8738slab class 3:chunk size Perslab 6898slab class 4:chunk size 192 Persla B 5461slab class 5:chunk size Perslab 4369slab class 6:chunk size 304 Perslab 3449slab Clas s 7:chunk size 384 Perslab 2730slab class 8:chunk size 480 Perslab 2184slab class 9:chunk size Perslab 1747slab class 10:chunk size 752 perslab 1394[[email protected] ~]# chkconfig--add m Emcached[[email protected] ~]# pecl install memcachechecking for the location of zlib ... Configure:error:memcache s Upport requires ZLIB. Use--with-zlib-dir=<dir> to specify prefix where zlib include and library is locatederror: '/var/tmp/memcache/conf Igure--enAble-memcache-session=yes ' failed[[email protected] ~]# yum install zlib-devel[[email protected] ~]# pecl Install Memcachebuild process completed successfullyinstalling '/usr/lib64/php/modules/memcache.so ' Install OK: Channel://pecl.php.net/memcache-2.2.7configuration option "Php_ini" is not set to php.ini locationyou should add "Extensi On=memcache.so "to php.ini[[email protected] ~]# vi/etc/php.ini[[email protected] ~]# service PHP-FPM Restart Stop php-fpm: [OK] starting PHP-FPM: [ Determine
Apc
[[email protected] ~]# pecl install APC in files containing self-/var/tmp/apc/apc.c:45:/usr/include/php/ext/pcre/php_pcre.h : 29:18: Error: Pcre.h: There are no files or directories in file included from/var/tmp/apc/apc.c:45:/usr/include/php/ext/pcre/php_pcre.h:37: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token/usr/include/php/ext/pcre/php_pcre.h:38: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token/usr/include/php/ext/pcre/php_pcre.h:44: Error: expected Specifier-qualifier-list before ' pcre ' [[email protected] ~]# yum install pcre-devel[[email protected] ~]# PECL Install Apcbuild process completed successfullyinstalling '/usr/lib64/php/modules/apc.so ' installing '/usr/ Include/php/ext/apc/apc_serializer.h ' Install ok:channel://pecl.php.net/apc-3.1.13configuration option ' Php_ini ' is Not set to PHP.ini locationyou should add "extension=apc.so" to php.ini[[email protected] ~]# vi/etc/php.ini[[email& Nbsp;protected] ~]# service php-fpm restart stop PHP-FPM: [OK] starting php-fpm: [OK]
Mcrypt
[[email protected] ~]# RPM-IVH http://mirrors.sohu.com/fedora-epel/6/i386/epel-release-6-8.noarch.rpm[[email protected] ~]# Yum updatecomplete! [[email protected] ~]# yum repolist loaded plugin: fastestmirrorloading mirror speeds from cached Hostfile * BASE:MIRRORS.CUG . edu.cn * epel:mirrors.zju.edu.cn * extras:mirrors.cug.edu.cn * updates:mirrors.cug.edu.cn Warehouse Identity Warehouse Name State base CentOS-6-base 6,518*ep El Extra Packages for Enterprise Linux 6-x86_64 11,188extras CentOS-6-Extras 36nginx nginx Repo 69updates CentOS-6-Updates 530repolist:18,341[[email protected] ~]# yum I Nstall php-mcrypt[[email protected] ~]# service php-fpm restart stop PHP-FPM: [OK] starting php-fpm: [OK]
"PHP extensions" CentOS installs extensions to PHP