LINUX安装memcached 服务器端

安装memcached 服务器端,需要先安装libevent库

wget http://www.monkey.org/~provos/libevent-1.4.14b-stable.tar.gz
tar zxvf  libevent-1.4.14b-stable.tar.gz
cd  libevent-1.4.14b-stable
./configure --prefix=/usr
make
make install

安装 memcached

wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
tar zxvf  memcached-1.4.5.tar.gz
cd memcached-1.4.5
./configure --prefix=/usr/local/webserver/memcache --with-libevent=/usr
make
make install

启动 memcached

/usr/local/webserver/memcache/bin/memcached -d -u nobody -m 20 127.0.0.1 -p 11211

如果需要memcached自启,请看下文:

vim /etc/rc.local

请在exit 0前添加以下语句:

/usr/local/webserver/memcache/bin/memcached -d -u nobody -m 20 127.0.0.1 -p 11211

cannot exec : No such file or directory at /pure-config.pl line 123. pureftp无法启动解决方法

/usr/local/web/pureftpd/bin/pure-config.pl /usr/local/web/pureftpd/etc/pure-ftpd.conf

Running: -A -c50 -B -C8 -D -fftp -H -I15 -lpuredb:/usr/local/pureftpd/etc/pureftpd.pdb -L2000:8 -m4 -s -U133:022 -u100 -k99 -Z
cannot exec : No such file or directory at /usr/local/prueftpd/bin/pure-config.pl line 123.

安装完pureftp但是无法运行,打开pure-config.pl,查看123行。内容如下。
exec { $PUREFTPD } ($PUREFTPD, @flg) or die “cannot exec $PUREFTPD: $!”;

继续搜索PUREFTPD ,找到

my $PUREFTPD;
-x && ($PUREFTPD=$_, last) for qw(
${exec_prefix}/sbin/pure-ftpd
/usr/local/pure-ftpd/sbin/pure-ftpd
/usr/local/pureftpd/sbin/pure-ftpd
/usr/local/sbin/pure-ftpd
/usr/sbin/pure-ftpd
);

ln -s /usr/local/web/pureftpd/sbin/pure-ftpd /usr/sbin/

运行上述命令行。
重新启动PURE-FTPD问题解决!