---
title: "linux下eaccelerator，memcache，memcached安装"
author: "jingsong27"
date: "2013-04-09T16:20:05Z"
tags: ["eaccelerator", "memcache", "memcached"]
categories: ["操作系统"]
slug: "linux-eaccelerator-memcache-memcached"
draft: false
lastmod: "2013-04-09T16:20:05Z"
id: 1844564
url: "https://rocky-wang.iteye.com/blog/1844564"
---

#1 安装eaccelerator

```
export PHP_PREFIX="/usr/local/webserver/php"
$PHP_PREFIX/bin/phpize
./configure --prefix=/usr/local/webserver/ --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
make
make install
```

 #2 安装memcache

```
/usr/local/webserver/php/bin/phpize
./configure –enable-memcache –with-php-config=/usr/local/webserver/php/bin/php-config –with-zlib-dir
make
make install
```

#3 安装memcached

memcached扩展：  
http://pecl.php.net/package/memcached  
(summary:PHP extension for interfacing with memcached via libmemcached library)通过libmemcached 库与memcached服务交互的php扩展

```
tar -zxvf libmemcached-1.0.4.tar.gz
cd libmemcached-1.0.4
./configure
make && make install 
```

 安装memcached

```
tar -xf memcached-2.0.1.tgz
cd memcached-2.0.1 /
usr/local/webserver/php/bin/phpize 
./configure  --with-php-config=/usr/local/webserver/php/bin/php-config
make && make install 
```