惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
Martin Fowler
Martin Fowler
Vercel News
Vercel News
U
Unit 42
Engineering at Meta
Engineering at Meta
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
Y
Y Combinator Blog
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
N
Netflix TechBlog - Medium
GbyAI
GbyAI
F
Fortinet All Blogs
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
M
MIT News - Artificial intelligence
D
Docker
IT之家
IT之家
Stack Overflow Blog
Stack Overflow Blog

博客园 - nasdaqhe

Frida 使用 Android https 抓包 云效流水线部署ack Android 解包重签名打包 centos7 docker 安装及配置 CentOS 6 升级 curl Mac 下编译安装 php-5.6 cmd下使用telnet连接到memcached服务器操作 Lucence.Net 2.9.3 日期范围搜索 SQL语句优化一例 row_number not in or flickr head中用到的标签 - nasdaqhe - 博客园 判断中文是否UTF8编码 MSSQL备忘 新浪微博产品图 (Vincent.H手笔) MindManage HTML5学习资料整理 ubuntu备忘 const 与 readonly ubuntu 10.04 安装 oracle11g VS2010 .NET 4学习资料整理
ubuntu+php5-fpm 下安装 memcached PHP扩展
nasdaqhe · 2011-05-15 · via 博客园 - nasdaqhe

 

1.获取编译工具下面要用来编译源代码,如果已经安装可跳过这步

  [bash] sudo apt-get install build-essential [/bash]

 2.安装PEAR and memcached

  [bash] sudo apt-get install php-pear memcached [/bash]

 3.编译libmemcached

  到 https://launchpad.net/libmemcached/+download 下载最新的libmemcached源代码,解压编译安装步骤如下:

  Extract the files with your preferred method, or type:

  [bash] tar -xzf libmemcached-0.37.tar.gz [/bash]

  Move into the extracted directory:

  [bash] cd libmemcached-0.37/ [/bash]

  Configure the package.

  [bash] ./configure –with-memcached [/bash]

  Make.

  [bash] make [/bash]

  Make install. Note this probably will require sudo rights.

  [bash] sudo make install [/bash]

 4.PECL

  [bash] sudo pecl install memcached [/bash]

  When this process completed, you should see something like this:

  [bash]

  Build process completed successfully

  Installing ‘/usr/lib/php5/20060613+lfs/memcached.so’

  install ok: channel://pecl.php.net/memcached-1.0.0

  Extension memcached enabled in php.ini

  [/bash]

 5.修改PHP.INI添加扩展

  [bash] sudo vi /etc/php5/fpm/php.ini [/bash] 

  在php.ini 中添加“extension = memcached.so”

  重启PHP-FPM服务

  [bash] sudo service php5-fpm restart [/bash]