#############################
1、安装memcache-2.2.5.tgz
cd memcache-2.2.5
/usr/local/php5/bin/phpize
./configure -enable-memcache -with-zlib-dir --with-php-config=/usr/local/php5/bin/php-config
make&&make install
cp /usr/local/src/software/php-5.2.10/ php.ini-dist /usr/local/php/lib/php.ini
vim /usr/local/php5/lib/php.ini /usr/local/php/lib/php.ini
修改extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-2007xxxx/"
添加extension = "memcache.so"
############################
2、安装apc扩展(PHP加速器)
下载地址http://pecl.php.net/package/APC
./configure -enable-apc -enable-apc-mmap -with-php-config=/usr/local/php5/bin/php-config
make&&make install
修改extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-2007xxxx/"
末尾添加
extension = “apc.so”
apc.enabled = 1
apc.cache_by_default = on
apc.shm_segments = 1
apc.shm_size = 32
apc.ttl = 600
apc.user_ttl = 600
apc.num_files_hint = 0
apc.write_lock = On
重启php-cgi进程,用phpinfo函数查看,就可以发现apc已经正常运行了
############################
3、安装xcache-1.2.2.tar.gz (PHP加速器)
# tar zxvf xcache-1.2.2.tar.gz
# cd xcache-1.2.2
# /usr/local/php5/bin/phpize
# ./configure --with-php-config=/usr/local/php5/bin/php-config --enable-xcache
#make&&make install
vi xcache-1.2.2/xcache.ini
[xcache-common]
zend_extension = /opt/aiya/nginx/fastcgi/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
; extension = xcache.so
[xcache.admin]
xcache.admin.enable_auth = On 
xcache.admin.user = "xcache"
; xcache.admin.pass = md5($your_password)
xcache.admin.pass = ""
[xcache]
xcache.shm_scheme =        "mmap"
xcache.size  =               32M
xcache.count =                 1
xcache.slots =                8K
xcache.ttl   =              3600
xcache.gc_interval =         300
xcache.var_size  =            2M
xcache.var_count =             1
xcache.var_slots =            8K
xcache.var_ttl   =             0
xcache.var_maxttl   =          0
xcache.var_gc_interval =     300
xcache.readonly_protection = Off
xcache.mmap_path =    "/dev/zero"
xcache.cacher =               On
xcache.stat   =               On
# cp xcache-1.2.2/xcache.ini /usr/local/php5/etc/xcache.ini
# cat /usr/local/php5/etc/xcache.ini >> /usr/local/php5/lib/php.ini
重启nginx php
############################
4、安装mysql分词插件 SCWS
wget http://www.ftphp.com/scws/down/scws-1.1.1.tar.bz2
tar xvjf scws-1.1.1.tar.bz2
cd scws-1.1.1
./configure --prefix=/usr/local/scws ; make ; make install
ls -al /usr/local/scws/lib/libscws.la //查看文件是否存在
/usr/local/scws/bin/scws -h
scws (scws-cli/1.1.1)
Simple Chinese Word Segmentation - Command line usage.
Copyright (C)2007 by hightman
如果需要在 php 中调用分词,建议继续阅读本文安装 php 扩展
cd scws-1.1.1/phpext
执行 phpize
 ./configure --with-scws=/usr/local/scws  --with-php-config=$php_prefix/bin/php-config
make&&make install
在 php.ini 中加入以下几行
[scws]
extension = scws.so
scws.default.charset = gbk
scws.default.fpath = /usr/local/scws/etc
执行 php -m 就能看到 scws 了或者在 phpinfo() 中看看关于 scws 的部分 重启 web 服务器
参考文档 http://www.ftphp.com/scws/docs.php#instscws
##################################
5、安装ImageMagick
下载地址:http://sourceforge.net/projects/p_w_picpathmagick/files/
tar zxvf ImageMagick-6.5.3.2
cd ImageMagick-6.5.3-2
./configure
make&&make install
下载地址:http://pecl.php.net/package/imagick
tar zxvf imagick-2.2.3.tgz (GD图象函数库的替代方案)
cd imagick-2.2.3
/usr/local/php5/bin/phpize
./configure --with-php-config=/urs/local/php5/bin/php-config
make&&make install
修改extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-2007xxxx/"
添加extension = "imagick.so"
重启nginx phps