Home  >  Q&A  >  body text

There are no redis and memcahe in the lnmp environment of the centos system. I compiled and installed it. Can PHP support redis and memcache extensions?

I am using Alibaba Cloud's redis and memcahce services. I do not need to install these two in the environment, but I need to make PHP support these two extensions

ringa_leeringa_lee2732 days ago688

reply all(3)I'll reply

  • 高洛峰

    高洛峰2017-05-19 10:10:10

    redis PHP extension, you can use it without relying on libraries pecl install redis Or just download the source code package and install it

    memcache needs to install dependent libraries first (the following are the names in the Debian series, other systems may be different)

    # for memcache
    zlib1g-dev
    
    # for memcached
    libmemcached-dev

    Then just use pecl or source code to install it

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-19 10:10:10

    It can be supported. First, PHP installs the extensions of redis and memcahce. Then you may need to modify the ini file of php-fpm and add the corresponding .so to enable the extension

    reply
    0
  • 某草草

    某草草2017-05-19 10:10:10

    You need redis and memcahce; PHP support expansion of redis and memcahce
    Then you already have these two from Alibaba Cloud, then you only need to install the PHP expansion:
    http://pecl.php.net/package/m. ..
    http://pecl.php.net/package/r...
    Then configure the connection

    reply
    0
  • Cancelreply