zoukankan      html  css  js  c++  java
  • centos'的yum安装php的memcache扩展

      让php能使用memcached服务的扩展有两种:memcache 和 memcached

      

      1. 先安装libmemcached扩展

        yum -y install libmemcached

      2. 安装php-pecl-memcache扩展

        yum -y install php-pecl-memcache

      3. 重启php

      4.可通过phpinfo()查看是否安装了memcache扩展

      5.安装成功后有可能在服务器能够通过telnet连接使用memcached服务,但是在php中通过new Memcache,加connect后返回的错误是连接被拒绝,这个原因是因为selinux安全机制的不允许memcached访问11211端口,所以必须对sulinux进行设置

         临时生效的方法: setenforce Permissive

         永久生效的方法:修改/etc/selinux/config文件,SELINUX=enforcing 改为 SELINUX=disabled,从而关闭selinux

  • 相关阅读:
    CodeForces 587A
    矩阵快速幂模板
    LCA模板
    Codeforces Round #226 (Div. 2 )
    Codeforces Round #225 (Div. 2)
    SGU132
    SRM 599 DIV 2
    POJ1038
    SGU223
    POJ1185
  • 原文地址:https://www.cnblogs.com/brady-wang/p/6088011.html
Copyright © 2011-2022 走看看