wdcp上安装memcache

首先要yum需要的开发包

yum install libevent-devel

1、安装memcached

http://memcached.org/
http://www.memcached.org/files/memcached-1.5.3.tar.gz

./configure –prefix=/usr/local/memcached –with-libevent=/usr/lib/
make
make install

2、编译php的memcache模块

http://pecl.php.net/package/memcache
http://pecl.php.net/get/memcache-2.2.7.tgz

/www/wdlinux/php/bin/phpize
./configure –with-php-config=/www/wdlinux/php/bin/php-config

make
make install

3、设置php配置文件加载memcache模块

/www/wdlinux/php/etc/php.ini
extension_dir = “/www/wdlinux/php/lib/php/extensions/no-debug-non-zts-20090626/”
extension=memcache.so

4、启动memcached服务

/usr/local/memcached/bin/memcached -d -m 1024 -p 11211 -u root

 

可能会遇到的问题:
checking build system type… Invalid configuration `: machine ` not recognized

解决办法是:

先安装好memcached后,再编译php的memcahe模块

Starting pure-ftpd: 421 Configuration error: Invalid SQL configuration file

对Pure-FTPd进行编译升级时候发现加载mysql配置错误,后来阅读Pure-FTPd官方文档发现编译时候不能丢一个比较关键的参数–with-everything,如果不加上此参数,mysql配置认证方式无法正常加载,启动ftp会提示以下错误:

Starting pure-ftpd: 421 Configuration error: Invalid SQL configuration file:

官方参考地址:https://download.pureftpd.org/pub/pure-ftpd/doc/README.MySQL

顺便附注一下编译安装Pure-FTPd的操作:

下载:

ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/
wget ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.46.tar.bz2

解压:
tar jxvf pure-ftpd-1.0.46.tar.bz2

编译:
./configure –prefix=/www/wdlinux/pureftpd-1.0.46 –with-tls –with-mysql –sysconfdir=/www/wdlinux/etc –with-language=simplified-chinese –with-everything

make && make install