Linux CentOS installation php memcache extension

Source: Internet
Author: User

One, Centos6.5 yum install php memcache extension Search Memcacheyum search memcache have, now can install Yum -y install  memcached memcached-devel php-pecl-memcache Verify the installation results memcached -hphp -m|grep  memcache  Start memcached/sbin/servive memcached start  test <?php$mem = new  Memcache, $mem->connect ("127.0.0.1",  11211); $mem->set (' key1 ',  ' this is first  Value ',  0, 60); $val  =  $mem->get (' Key1 '); Var_dump ($val);  II, centos6.5  Compile and install install PHP memcache extensions   Instructions: PHP installation directory:/usr/local/php5php.ini profile path:/usr/local/php5/etc/php.ininginx installation directory:/usr/ Local/nginxnginx Web site root:/USR/LOCAL/NGINX/HTML1, installing the compilation tool yum install wget  make gcc  gcc-c++ zlib-devel openssl openssl-devel pcre-devel kernel keyutils   PATCH&NBSP;PERL2, installing memcachecd /usr/local/src   #进入软件包存放目录wget  http://pecl.php.net/get/ memcache-2.2.6.tgz   #下载tar  zxvf memcache-2.2.6.tgz   #解压cd  memcache-2.2.6   #进入安装目录/usr/local/php5/bin/ phpize   #用phpize生成configure配置文件./configure  --with-php-config=/usr/local/php5/bin/ php-config   #配置  make   #编译make  install  #安装安装完成之后, the following interface appears, remember the path below, which will be used later. /usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/   #memcache模块路径3, configure PHP support Memcachevi  /usr/local/php5/etc/php.ini   #编辑配置文件, add the following on the last line extension= "memcache.so" 4, Test vi /usr/local/ nginx/html/phpinfo.php    #编辑 <?phpphpinfo ();? >wq!  #保存退出service  php-fpm restart   #重启php-fpmservice nginx restart    #重启nginx浏览器打开phpinfo .php  as shown, you can see Memcache related information  

Linux CentOS installation php memcache extension

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.