"PHP extensions" CentOS installs extensions to PHP

Source: Internet
Author: User
Tags apc mcrypt yum repolist
This article consists of A little drizzle .Original, Forbidden reprint.

Memcache

[Root@localhost ~]# yum install libmemcached[root@localhost ~]# yum install memcached[root@localhost ~]# memcached-m 512 -U nobody-vvslab class 1:chunk size Perslab 10922slab class 2:chunk size Perslab 8738slab Class 3:chunk size Perslab 6898slab class 4:chunk size 192 Perslab 5461slab class 5:chunk S ize Perslab 4369slab class 6:chunk size 304 Perslab 3449slab class 7:chunk size 384 pers Lab 2730slab class 8:chunk size 480 Perslab 2184slab class 9:chunk size Perslab 1747slab cl  10:chunk size 752 perslab 1394[root@localhost ~]# chkconfig--add memcached[root@localhost ~]# pecl Install Memcachechecking for the location of zlib ... Configure:error:memcache support requires zlib. Use--with-zlib-dir=
 
  To 
  
   specify prefix where ZLIB include and library is Locatederror: '/var/tmp/memcache/configure--enable-memcache-s Ession=yes ' failed[root@localhost ~]# yum install zlib-devel[root@localhost ~]# pecl install memcachebuild process comple Ted 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 "extension=memcache.so" to PHP.I                                             Ni[root@localhost ~]# vi/etc/php.ini[root@localhost ~]# service php-fpm restart stop PHP-FPM: [OK] starting php-fpm: [OK]
  
 

Apc

[root@localhost ~]# 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: 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 ' [root@localhost ~]# yum install pcre-devel[root@localhost ~]# 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 ' isn't set to PHP.ini Locationyou should add "extension=apc.so" to Php.ini[root@localhost ~]# vi/etc/php.ini[root@localhost ~]# service PHP-FP     M restart stop php-fpm: [OK] starting PHP-FPM:                                    Determine 

Mcrypt

[Root@localhost ~]# RPM-IVH Http://mirrors.sohu.com/fedora-epel/6/i386/epel-release-6-8.noarch.rpm[root@localhost ~]# Yum updatecomplete!  [Root@localhost ~]# 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*epel                                           Extra Packages for Enterprise Linux 6-x86_64 11,188extras CentOS-6-Extras           36nginx nginx Repo 69updates CentOS-6-Updates 530repolist:18,341[root@localhost ~]# yum Install Php-mcrypt              [root@localhost ~]# service php-fpm Restart stop php-fpm: [OK] starting PHP-FPM:                           Determine 
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.