LINUX/UNIX 下安装pureftpd+mysql验证

一.修正安装环境
LINUX:

vi /etc/ld.so.conf

增加你MYSQL LIB的地址,例如我的:

/usr/local/webserver/mysql/lib/mysql

运行ldconfig更新/etc/ld.so.cache即可

UNIX(FreeBSD):
执行

cp /usr/local/webserver/mysql/lib/mysql/*.* /usr/lib/

把MYSQL LIB文件拷贝到LIB文件夹下!
二.开始安装

wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.29.tar.gz
tar zvxf pure-ftpd-1.0.29.tar.gz
cd pure-ftpd-1.0.29
./configure --prefix=/usr/local/webserver/pureftpd --with-mysql=/usr/local/webserver/mysql --with-puredb --with-paranoidmsg --with-shadow --with-welcomemsg --with-uploadscript --with-cookie --with-virtualchroot --with-virtualhosts --with-virtualroot --with-diraliases --with-quotas --with-sysquotas --with-ratios --with-ftpwho --with-throttling --with-rfc2640 --with-language=simplified-chinese

如果你的mysql是编译安装的,需要在–with-mysql加上你的安装目录,比如–with-mysql=/usr/local/webserver/mysql

make
make check
make install

mkdir /usr/local/webserver/pureftpd/etc/
cp configuration-file/pure-config.pl /usr/local/webserver/pureftpd/bin/
cp configuration-file/pure-ftpd.conf /usr/local/webserver/pureftpd/etc/
chmod +x /usr/local/webserver/pureftpd/bin/pure-config.pl
cd ..

这样安装就完成了,还有问题可以看 //www.byte128.com/blog/2010-11/108.html 这篇文章!

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问题解决!